Commit 7124d1a5 by Hristian Kirtchev Committed by Arnaud Charlet

sem_ch10.adb, [...]: Minor reformatting.

2017-01-20  Hristian Kirtchev  <kirtchev@adacore.com>

	* sem_ch10.adb, sem_cat.adb: Minor reformatting.

From-SVN: r244703
parent 89a53f83
2017-01-20 Hristian Kirtchev <kirtchev@adacore.com>
* sem_ch10.adb, sem_cat.adb: Minor reformatting.
2017-01-20 Javier Miranda <miranda@adacore.com> 2017-01-20 Javier Miranda <miranda@adacore.com>
* sem_ch3.adb (Access_Type_Declaration): Protect access to the * sem_ch3.adb (Access_Type_Declaration): Protect access to the
......
...@@ -1015,19 +1015,22 @@ package body Sem_Cat is ...@@ -1015,19 +1015,22 @@ package body Sem_Cat is
Item := First (Context_Items (P)); Item := First (Context_Items (P));
while Present (Item) loop while Present (Item) loop
if Nkind (Item) = N_With_Clause if Nkind (Item) = N_With_Clause
and then not (Implicit_With (Item) and then
not (Implicit_With (Item)
or else Limited_Present (Item) or else Limited_Present (Item)
-- Skip if error already posted on the WITH -- Skip if error already posted on the WITH clause (in
-- clause (in which case the Name attribute -- which case the Name attribute may be invalid). In
-- may be invalid). In particular, this fixes -- particular, this fixes the problem of hanging in the
-- the problem of hanging in the presence of a -- presence of a WITH clause on a child that is an
-- WITH clause on a child that is an illegal -- illegal generic instantiation.
-- generic instantiation.
or else Error_Posted (Item)) or else Error_Posted (Item))
and then not (Try_Semantics and then
not (Try_Semantics
-- Skip processing malformed trees -- Skip processing malformed trees
and then Nkind (Name (Item)) not in N_Has_Entity) and then Nkind (Name (Item)) not in N_Has_Entity)
then then
Entity_Of_Withed := Entity (Name (Item)); Entity_Of_Withed := Entity (Name (Item));
......
...@@ -4202,14 +4202,16 @@ package body Sem_Ch10 is ...@@ -4202,14 +4202,16 @@ package body Sem_Ch10 is
-- Do not install private_with_clauses declaration, unless unit -- Do not install private_with_clauses declaration, unless unit
-- is itself a private child unit, or is a body. Note that for a -- is itself a private child unit, or is a body. Note that for a
-- subprogram body the private_with_clause does not take effect until -- subprogram body the private_with_clause does not take effect
-- after the specification. -- until after the specification.
if Nkind (Item) /= N_With_Clause if Nkind (Item) /= N_With_Clause
or else Implicit_With (Item) or else Implicit_With (Item)
or else Limited_Present (Item) or else Limited_Present (Item)
or else Error_Posted (Item) or else Error_Posted (Item)
-- Skip processing malformed trees -- Skip processing malformed trees
or else (Try_Semantics or else (Try_Semantics
and then Nkind (Name (Item)) not in N_Has_Entity) and then Nkind (Name (Item)) not in N_Has_Entity)
then then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment