]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Minor reformatting
authorHristian Kirtchev <kirtchev@adacore.com>
Thu, 4 Jul 2019 08:05:40 +0000 (08:05 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Thu, 4 Jul 2019 08:05:40 +0000 (08:05 +0000)
2019-07-04  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

* erroutc.adb, exp_aggr.adb, inline.adb, opt.adb, sem_ch3.adb:
Minor reformatting.

From-SVN: r273051

gcc/ada/ChangeLog
gcc/ada/erroutc.adb
gcc/ada/exp_aggr.adb
gcc/ada/inline.adb
gcc/ada/opt.adb
gcc/ada/sem_ch3.adb

index 127c24346c64fb018860d295ef0169d385940567..6f300dceb816be1ac718f46c168c834ddca82f90 100644 (file)
@@ -1,3 +1,8 @@
+2019-07-04  Hristian Kirtchev  <kirtchev@adacore.com>
+
+       * erroutc.adb, exp_aggr.adb, inline.adb, opt.adb, sem_ch3.adb:
+       Minor reformatting.
+
 2019-07-04  Yannick Moy  <moy@adacore.com>
 
        * sem_spark.adb (Explanation, Get_Expl): New functions to get
index 0c8ef5de7cc9690efd43fece8143c044452eb973..2ea0c2d2809158c38e7757133cd8b794c69f0d90 100644 (file)
@@ -1606,6 +1606,7 @@ package body Erroutc is
          if Start <= Cur_Loc and then Cur_Loc <= Stop then
             return True;
          end if;
+
          Cur_Loc := Instantiation_Location (Cur_Loc);
       end loop;
 
index 7099d93691cea8e3a68ca9098c8194a0967ad74e..7c41477e32d54b30b3da88ad7aa718b9a7baa3b7 100644 (file)
@@ -1343,11 +1343,11 @@ package body Exp_Aggr is
             --  transient scope, which leads to premature finalization.
 
             --  This in-place expansion is not performed for limited transient
-            --  objects because the initialization is already done in-place.
+            --  objects, because the initialization is already done in place.
 
             if In_Place_Expansion then
 
-               --  Suppress the removal of side effects by general analysis
+               --  Suppress the removal of side effects by general analysis,
                --  because this behavior is emulated here. This avoids the
                --  generation of a transient scope, which leads to out-of-order
                --  adjustment and finalization.
@@ -4181,8 +4181,8 @@ package body Exp_Aggr is
                      return False;
                   end if;
 
-               --  If association has a box, no way to determine yet
-               --  whether default can be assigned in place.
+               --  If association has a box, no way to determine yet whether
+               --  default can be assigned in place.
 
                elsif Box_Present (Expr) then
                   return False;
@@ -4239,8 +4239,8 @@ package body Exp_Aggr is
                         and then Is_Array
                         and then Check_Component (Prefix (Comp)))
 
-              or else (Nkind_In (Comp, N_Unchecked_Type_Conversion,
-                                 N_Type_Conversion)
+              or else (Nkind_In (Comp, N_Type_Conversion,
+                                       N_Unchecked_Type_Conversion)
                         and then Check_Component (Expression (Comp)));
          end Check_Component;
 
@@ -4269,12 +4269,10 @@ package body Exp_Aggr is
 
                return False;
 
-            elsif Nkind (Parent (Expr)) =
-                    N_Iterated_Component_Association
-            then
-               --  Ditto for iterated component associations, which in
-               --  general require an enclosing loop and involve nonstatic
-               --  expressions.
+            elsif Nkind (Parent (Expr)) = N_Iterated_Component_Association then
+
+               --  Ditto for iterated component associations, which in general
+               --  require an enclosing loop and involve nonstatic expressions.
 
                return False;
             end if;
@@ -4469,8 +4467,8 @@ package body Exp_Aggr is
          Establish_Transient_Scope (N, Manage_Sec_Stack => False);
       end if;
 
-      --  If the aggregate is nonlimited, create a temporary since aggregates
-      --  have "by copy" semantic. If it is limited and context is an
+      --  If the aggregate is nonlimited, create a temporary, since aggregates
+      --  have "by copy" semantics. If it is limited and context is an
       --  assignment, this is a subaggregate for an enclosing aggregate being
       --  expanded. It must be built in place, so use target of the current
       --  assignment.
@@ -4484,7 +4482,7 @@ package body Exp_Aggr is
          Rewrite (Parent (N), Make_Null_Statement (Loc));
 
       --  Do not declare a temporary to initialize an aggregate assigned to an
-      --  identifier when in place assignment is possible preserving the
+      --  identifier when in-place assignment is possible, preserving the
       --  by-copy semantic of aggregates. This avoids large stack usage and
       --  generates more efficient code.
 
@@ -5122,7 +5120,7 @@ package body Exp_Aggr is
    --     case pass it as is to Gigi. Note that a necessary condition for
    --     static processing is that the aggregate be fully positional.
 
-   --  5. If in place aggregate expansion is possible (i.e. no need to create
+   --  5. If in-place aggregate expansion is possible (i.e. no need to create
    --     a temporary) then mark the aggregate as such and return. Otherwise
    --     create a new temporary and generate the appropriate initialization
    --     code.
@@ -5146,7 +5144,7 @@ package body Exp_Aggr is
       --  The type of each index
 
       In_Place_Assign_OK_For_Declaration : Boolean := False;
-      --  True if we are to generate an in place assignment for a declaration
+      --  True if we are to generate an in-place assignment for a declaration
 
       Maybe_In_Place_OK : Boolean;
       --  If the type is neither controlled nor packed and the aggregate
@@ -6214,7 +6212,7 @@ package body Exp_Aggr is
 
       --  STEP 4
 
-      --  Look if in place aggregate expansion is possible
+      --  Check whether in-place aggregate expansion is possible
 
       --  For object declarations we build the aggregate in place, unless
       --  the array is bit-packed.
@@ -6366,7 +6364,7 @@ package body Exp_Aggr is
 
       --  Step 5
 
-      --  In place aggregate expansion is not possible
+      --  In-place aggregate expansion is not possible
 
       else
          Maybe_In_Place_OK := False;
@@ -6418,11 +6416,11 @@ package body Exp_Aggr is
             Target := New_Copy (Tmp);
          end if;
 
-         --  If we are to generate an in place assignment for a declaration or
+         --  If we are to generate an in-place assignment for a declaration or
          --  an assignment statement, and the assignment can be done directly
          --  by the back end, then do not expand further.
 
-         --  ??? We can also do that if in place expansion is not possible but
+         --  ??? We can also do that if in-place expansion is not possible but
          --  then we could go into an infinite recursion.
 
          if (In_Place_Assign_OK_For_Declaration or else Maybe_In_Place_OK)
@@ -7683,8 +7681,8 @@ package body Exp_Aggr is
       P : Node_Id := Parent (N);
 
    begin
-      --  Aggregates are not supported for non standard rep clauses since
-      --  they may lead to extra padding fields in CCG.
+      --  Aggregates are not supported for nonstandard rep clauses, since they
+      --  may lead to extra padding fields in CCG.
 
       if Ekind (Etype (N)) in Record_Kind
         and then Has_Non_Standard_Rep (Etype (N))
index b2038a6a047cdf4f84d52a2cf002e5538d1df3a9..907975e8e5126b619aa70b560dfc3ce0b44dc45d 100644 (file)
@@ -2481,8 +2481,7 @@ package body Inline is
       --  thunk generated for it. Replace a return statement with an assignment
       --  to the target of the call, with appropriate conversions if needed.
 
-      function Process_Formals_In_Aspects (N : Node_Id)
-        return Traverse_Result;
+      function Process_Formals_In_Aspects (N : Node_Id) return Traverse_Result;
       --  Because aspects are linked indirectly to the rest of the tree,
       --  replacement of formals appearing in aspect specifications must
       --  be performed in a separate pass, using an instantiation of the
@@ -2832,10 +2831,11 @@ package body Inline is
       -- Process_Formals_In_Aspects --
       --------------------------------
 
-      function Process_Formals_In_Aspects (N : Node_Id)
-        return Traverse_Result
+      function Process_Formals_In_Aspects
+        (N : Node_Id) return Traverse_Result
       is
          A : Node_Id;
+
       begin
          if Has_Aspects (N) then
             A := First (Aspect_Specifications (N));
@@ -2849,7 +2849,7 @@ package body Inline is
       end Process_Formals_In_Aspects;
 
       procedure Replace_Formals_In_Aspects is
-         new Traverse_Proc (Process_Formals_In_Aspects);
+        new Traverse_Proc (Process_Formals_In_Aspects);
 
       ------------------
       -- Process_Sloc --
index 05f9059eaa0de64b5e9946ca32af23a752ffe5c1..4ceffb02c367f74789a8e6f71315a3e552143043 100644 (file)
@@ -254,6 +254,7 @@ package body Opt is
             if GNATprove_Mode then
                pragma Assert (Assertions_Enabled);
                null;
+
             elsif GNAT_Mode_Config then
                Assertions_Enabled    := Assertions_Enabled_Config;
             else
index 75a00996b858fff904bc28a9ae67a397da588776..a82c2bca23d165b3defab0b276af527f82c7e59a 100644 (file)
@@ -930,7 +930,8 @@ package body Sem_Ch3 is
       --  declaration may include an expression that is an allocator, whose
       --  expansion needs the proper Master for the created tasks.
 
-      if Nkind (Related_Nod) = N_Object_Declaration and then Expander_Active
+      if Expander_Active
+        and then Nkind (Related_Nod) = N_Object_Declaration
       then
          if Is_Limited_Record (Desig_Type)
            and then Is_Class_Wide_Type (Desig_Type)
@@ -940,7 +941,8 @@ package body Sem_Ch3 is
          --  Similarly, if the type is an anonymous access that designates
          --  tasks, create a master entity for it in the current context.
 
-         elsif Has_Task (Desig_Type) and then Comes_From_Source (Related_Nod)
+         elsif Has_Task (Desig_Type)
+           and then Comes_From_Source (Related_Nod)
          then
             Build_Master_Entity (Defining_Identifier (Related_Nod));
             Build_Master_Renaming (Anon_Type);