sem_ch7.adb, [...]: Minor reformatting.
authorRobert Dewar <dewar@adacore.com>
Thu, 25 Apr 2013 10:09:35 +0000 (10:09 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Thu, 25 Apr 2013 10:09:35 +0000 (12:09 +0200)
2013-04-25  Robert Dewar  <dewar@adacore.com>

* sem_ch7.adb, einfo.adb, repinfo.adb, snames.adb-tmpl,
snames.ads-tmpl: Minor reformatting.

From-SVN: r198281

gcc/ada/ChangeLog
gcc/ada/einfo.adb
gcc/ada/repinfo.adb
gcc/ada/sem_ch7.adb
gcc/ada/snames.adb-tmpl
gcc/ada/snames.ads-tmpl

index eadf65bb6d45a5a23c8a080e74f0c7124040fe87..fe5113af9174eb0e9019cdcfe2d9575c32dbb036 100644 (file)
@@ -1,3 +1,8 @@
+2013-04-25  Robert Dewar  <dewar@adacore.com>
+
+       * sem_ch7.adb, einfo.adb, repinfo.adb, snames.adb-tmpl,
+       snames.ads-tmpl: Minor reformatting.
+
 2013-04-25  Thomas Quinot  <quinot@adacore.com>
 
        * sem_ch7.adb: Minor reformatting.
index 50735a3049ce978298f15d1678aa9d6bd28a4322..0381548b5ef678e2f56dbae879b186600fd3d5f8 100644 (file)
@@ -6796,8 +6796,7 @@ package body Einfo is
 
    function Is_Wrapper_Package (Id : E) return B is
    begin
-      return (Ekind (Id) = E_Package
-                and then Present (Related_Instance (Id)));
+      return (Ekind (Id) = E_Package and then Present (Related_Instance (Id)));
    end Is_Wrapper_Package;
 
    -----------------
index 1c0222f0848caf616f59b3f27aa138b23596fd8e..a907c7b9d18c6abe81ac64129a26864f4224a2c3 100644 (file)
@@ -458,7 +458,6 @@ package body Repinfo is
            and then Present (Corresponding_Spec (Find_Declaration (Ent)))
          then
             E := First_Entity (Corresponding_Spec (Find_Declaration (Ent)));
-
             while Present (E) loop
                if Is_Subprogram (E)
                  and then
@@ -727,7 +726,6 @@ package body Repinfo is
       Form := First_Formal (Ent);
       while Present (Form) loop
          Get_Unqualified_Decoded_Name_String (Chars (Form));
-
          while Name_Len <= Plen loop
             Name_Len := Name_Len + 1;
             Name_Buffer (Name_Len) := ' ';
@@ -1346,7 +1344,6 @@ package body Repinfo is
                   when Discrim_Val =>
                      declare
                         Sub : constant Int := UI_To_Int (Node.Op1);
-
                      begin
                         pragma Assert (Sub in D'Range);
                         return D (Sub);
index fcd8769399a85966d704c20c1e9f3e2c34481925..59d566a8168b94a980177200d91249b8b9c69015 100644 (file)
@@ -557,6 +557,7 @@ package body Sem_Ch7 is
                     and then Ekind (Entity (N)) = E_Constant
                   then
                      V := Constant_Value (Entity (N));
+
                      if Present (V)
                        and then not Compile_Time_Known_Value_Or_Aggr (V)
                      then
@@ -1166,7 +1167,7 @@ package body Sem_Ch7 is
                   while Present (Inst_Par)
                     and then Inst_Par /= Standard_Standard
                     and then (not In_Open_Scopes (Inst_Par)
-                                or else not In_Private_Part (Inst_Par))
+                               or else not In_Private_Part (Inst_Par))
                   loop
                      Install_Private_Declarations (Inst_Par);
                      Set_Use (Private_Declarations
@@ -1660,8 +1661,8 @@ package body Sem_Ch7 is
                              and then Present (DTC_Entity (New_Op))
                              and then Present (DTC_Entity (Prim_Op))
                            then
-                              pragma Assert (DT_Position (New_Op)
-                                              = DT_Position (Prim_Op));
+                              pragma Assert
+                                (DT_Position (New_Op) = DT_Position (Prim_Op));
                               null;
                            end if;
 
@@ -1860,9 +1861,8 @@ package body Sem_Ch7 is
                Set_Is_Potentially_Use_Visible
                  (Priv, Is_Potentially_Use_Visible (Node (Priv_Elmt)));
 
-               --  Within a child unit, recurse, except in generic child
-               --  unit, which (unfortunately) handle private_dependents
-               --  separately.
+               --  Within a child unit, recurse, except in generic child unit,
+               --  which (unfortunately) handle private_dependents separately.
 
                if Is_Priv
                  and then Is_Child_Unit (Cunit_Entity (Current_Sem_Unit))
@@ -2019,7 +2019,7 @@ package body Sem_Ch7 is
 
          return In_Open_Scopes (S)
            or else (Is_Generic_Instance (Current_Scope)
-              and then Scope (Dep) = Scope (Current_Scope));
+                     and then Scope (Dep) = Scope (Current_Scope));
       else
          return True;
       end if;
@@ -2317,8 +2317,7 @@ package body Sem_Ch7 is
             Check_Conventions (Id);
          end if;
 
-         if (Ekind (Id) = E_Private_Type
-               or else Ekind (Id) = E_Limited_Private_Type)
+         if Ekind_In (Id, E_Private_Type, E_Limited_Private_Type)
            and then No (Full_View (Id))
            and then not Is_Generic_Type (Id)
            and then not Is_Derived_Type (Id)
@@ -2463,8 +2462,6 @@ package body Sem_Ch7 is
                  ("full view of type must be definite subtype", Full);
             end if;
 
-            Priv_Elmt := First_Elmt (Private_Dependents (Id));
-
             --  Swap out the subtypes and derived types of Id that
             --  were compiled in this scope, or installed previously
             --  by Install_Private_Declarations.
@@ -2473,6 +2470,7 @@ package body Sem_Ch7 is
             --  field which may be empty due to a swap by a previous call to
             --  End_Package_Scope (e.g. from the freezing mechanism).
 
+            Priv_Elmt := First_Elmt (Private_Dependents (Id));
             while Present (Priv_Elmt) loop
                Priv_Sub := Node (Priv_Elmt);
 
@@ -2552,7 +2550,7 @@ package body Sem_Ch7 is
                      if Etype (Subp) = Id
                        or else
                          (Is_Class_Wide_Type (Etype (Subp))
-                            and then Etype (Etype (Subp)) = Id)
+                           and then Etype (Etype (Subp)) = Id)
                      then
                         Error_Msg_NE
                           ("type& must be completed in the private part",
@@ -2565,8 +2563,7 @@ package body Sem_Ch7 is
             end;
 
          elsif not Is_Child_Unit (Id)
-           and then (not Is_Private_Type (Id)
-                      or else No (Full_View (Id)))
+           and then (not Is_Private_Type (Id) or else No (Full_View (Id)))
          then
             Set_Is_Hidden (Id);
             Set_Is_Potentially_Use_Visible (Id, False);
index f79e48119012d410cf410e18aff5491ad8ccb1f5..5a6cfbaada79fa3c3a34ed7fb50a19f7a0ef8dbc 100644 (file)
@@ -147,8 +147,8 @@ package body Snames is
       case N is
          when Name_Ada                   => return Convention_Ada;
          when Name_Ada_Pass_By_Copy      => return Convention_Ada_Pass_By_Copy;
-         when Name_Ada_Pass_By_Reference =>
-            return Convention_Ada_Pass_By_Reference;
+         when Name_Ada_Pass_By_Reference => return
+                                              Convention_Ada_Pass_By_Reference;
          when Name_Assembler             => return Convention_Assembler;
          when Name_C                     => return Convention_C;
          when Name_CIL                   => return Convention_CIL;
index 2ddae4d052b30062accb981b0ce014426234568d..2e5f42b210624155f0001be0a9221845cb3e40de 100644 (file)
@@ -1625,7 +1625,7 @@ package Snames is
    type Convention_Id is (
 
       --  The native-to-Ada (non-foreign) conventions come first. These include
-      --  the ones defined in the RM, plus Stubbed.
+      --  the ones defined in the RM, plus Ghost and Stubbed.
 
       Convention_Ada,
       Convention_Intrinsic,