projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8cec068
)
[Ada] Prevent search for references in postconditions from going too far
author
Piotr Trojanek
<trojanek@adacore.com>
Sat, 22 Jan 2022 13:51:27 +0000
(14:51 +0100)
committer
Pierre-Marie de Rodat
<derodat@adacore.com>
Tue, 10 May 2022 08:19:27 +0000
(08:19 +0000)
Add a standard prevention against climbing the entire compilation unit.
Cleanup only; behaviour of the compiler is unaffected.
gcc/ada/
* sem_warn.adb (Within_Postcondition): Guard against search
going too far.
gcc/ada/sem_warn.adb
patch
|
blob
|
history
diff --git
a/gcc/ada/sem_warn.adb
b/gcc/ada/sem_warn.adb
index
31ba4d1
..
d1f2036
100644
(file)
--- a/
gcc/ada/sem_warn.adb
+++ b/
gcc/ada/sem_warn.adb
@@
-2007,6
+2007,11
@@
package body Sem_Warn is
then
return True;
end if;
+
+ -- Prevent the search from going too far
+
+ elsif Is_Body_Or_Package_Declaration (Nod) then
+ exit;
end if;
Nod := Parent (Nod);