mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
[Ada] Cleanup related to volatile objects in restricted contexts
gcc/ada/ * sem_res.adb (Is_Assignment_Or_Object_Expression): Whitespace cleanup. (Is_Attribute_Expression): Prevent AST climbing from going to the root of the compilation unit.
This commit is contained in:
committed by
Pierre-Marie de Rodat
parent
788fed4b39
commit
f7f37ed649
@@ -7701,8 +7701,7 @@ package body Sem_Res is
|
||||
Expr : Node_Id) return Boolean
|
||||
is
|
||||
begin
|
||||
if Nkind (Context) in
|
||||
N_Assignment_Statement | N_Object_Declaration
|
||||
if Nkind (Context) in N_Assignment_Statement | N_Object_Declaration
|
||||
and then Expression (Context) = Expr
|
||||
then
|
||||
return True;
|
||||
@@ -7744,6 +7743,11 @@ package body Sem_Res is
|
||||
while Present (N) loop
|
||||
if Nkind (N) = N_Attribute_Reference then
|
||||
return True;
|
||||
|
||||
-- Prevent the search from going too far
|
||||
|
||||
elsif Is_Body_Or_Package_Declaration (N) then
|
||||
return False;
|
||||
end if;
|
||||
|
||||
N := Parent (N);
|
||||
|
||||
Reference in New Issue
Block a user