]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Remove redundant checks for non-empty list of aspects
authorPiotr Trojanek <trojanek@adacore.com>
Mon, 28 Jun 2021 20:34:10 +0000 (22:34 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 20 Sep 2021 12:31:38 +0000 (12:31 +0000)
gcc/ada/

* inline.adb (Has_Excluded_Declaration): Remove redundant guard;
the guarded code will call First on a No_List, which is
well-defined and gives Empty.

gcc/ada/inline.adb

index 84e2bc866b9c5438a7d855d2ffbdf6593b36a939..773b376685b23c3aca282a9ecf50624011c77ad6 100644 (file)
@@ -4319,9 +4319,7 @@ package body Inline is
          --  functions, i.e. nested subprogram bodies, so inlining is not
          --  possible.
 
-         elsif Nkind (Decl) = N_Subtype_Declaration
-           and then Present (Aspect_Specifications (Decl))
-         then
+         elsif Nkind (Decl) = N_Subtype_Declaration then
             declare
                A    : Node_Id;
                A_Id : Aspect_Id;