aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorJustin Squirek <squirek@adacore.com>2023-12-21 18:35:22 +0000
committerMarc Poulhiès <poulhies@adacore.com>2024-05-06 11:11:29 +0200
commit373921dc7b2ada3960b5fbb99cb4cf543ff4ffa0 (patch)
treeb9ebb33b95c31cd060e26af37c75a239439c48be /gcc/ada
parent0b7c0811ced8c98b4bebd1bc89f2272216000900 (diff)
downloadgcc-373921dc7b2ada3960b5fbb99cb4cf543ff4ffa0.zip
gcc-373921dc7b2ada3960b5fbb99cb4cf543ff4ffa0.tar.gz
gcc-373921dc7b2ada3960b5fbb99cb4cf543ff4ffa0.tar.bz2
ada: Spurious reference warning on qualified expression
Incremental improvement/clean up. gcc/ada/ * sem_warn.adb (Within_Postcondition): Renamed to Within_Contract_Or_Predicate.
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/sem_warn.adb20
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/ada/sem_warn.adb b/gcc/ada/sem_warn.adb
index 0a54b3e..8317b44 100644
--- a/gcc/ada/sem_warn.adb
+++ b/gcc/ada/sem_warn.adb
@@ -1958,16 +1958,16 @@ package body Sem_Warn is
SR : Entity_Id;
SE : constant Entity_Id := Scope (E);
- function Within_Postcondition return Boolean;
- -- Returns True if N is within a Postcondition, a
- -- Refined_Post, an Ensures component in a Test_Case,
- -- or a Contract_Cases.
+ function Within_Contract_Or_Predicate return Boolean;
+ -- Returns True if N is within a contract or predicate,
+ -- an Ensures component in a Test_Case, or a
+ -- Contract_Cases.
- --------------------------
- -- Within_Postcondition --
- --------------------------
+ ----------------------------------
+ -- Within_Contract_Or_Predicate --
+ ----------------------------------
- function Within_Postcondition return Boolean is
+ function Within_Contract_Or_Predicate return Boolean is
Nod, P : Node_Id;
begin
@@ -2012,7 +2012,7 @@ package body Sem_Warn is
end loop;
return False;
- end Within_Postcondition;
+ end Within_Contract_Or_Predicate;
-- Start of processing for Potential_Unset_Reference
@@ -2136,7 +2136,7 @@ package body Sem_Warn is
-- postcondition, since the expression occurs in a
-- place unrelated to the actual test.
- if not Within_Postcondition then
+ if not Within_Contract_Or_Predicate then
-- Here we definitely have a case for giving a warning
-- for a reference to an unset value. But we don't