diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2024-11-10 10:46:54 +0100 |
---|---|---|
committer | Marc Poulhiès <dkm@gcc.gnu.org> | 2024-11-19 13:58:50 +0100 |
commit | 3f28c4f1df9f898f70acb244dc71f5b2cc57471b (patch) | |
tree | 616ca6bb252b5cd18c4e5b97a18677a3138ac468 | |
parent | e93d685129155cb4ffd159e72ec40cbff7f2d82d (diff) | |
download | gcc-3f28c4f1df9f898f70acb244dc71f5b2cc57471b.zip gcc-3f28c4f1df9f898f70acb244dc71f5b2cc57471b.tar.gz gcc-3f28c4f1df9f898f70acb244dc71f5b2cc57471b.tar.bz2 |
ada: Rename Within_Case_Or_If_Expression predicate
The case and if expressions are exactly the conditional expressions.
gcc/ada/ChangeLog:
* exp_util.ads (Within_Case_Or_If_Expression): Rename into...
(Within_Conditional_Expression): ...this.
* exp_util.adb (Within_Case_Or_If_Expression): Rename into...
(Within_Conditional_Expression): ...this.
* checks.adb (Install_Null_Excluding_Check): Adjust for renaming.
-rw-r--r-- | gcc/ada/checks.adb | 2 | ||||
-rw-r--r-- | gcc/ada/exp_util.adb | 12 | ||||
-rw-r--r-- | gcc/ada/exp_util.ads | 6 |
3 files changed, 10 insertions, 10 deletions
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb index 8a3c4e8..1ec4992 100644 --- a/gcc/ada/checks.adb +++ b/gcc/ada/checks.adb @@ -8427,7 +8427,7 @@ package body Checks is -- where the expression might not be evaluated, and the warning -- appear as extraneous noise. - and then not Within_Case_Or_If_Expression (N) + and then not Within_Conditional_Expression (N) then Apply_Compile_Time_Constraint_Error (N, "null value not allowed here??", CE_Access_Check_Failed); diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index e4397fe..149be62 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -6702,7 +6702,7 @@ package body Exp_Util is -- then we need to insert at the appropriate (inner) location in -- the not as an action on Node_To_Be_Wrapped. - In_Cond_Expr : constant Boolean := Within_Case_Or_If_Expression (N); + In_Cond_Expr : constant Boolean := Within_Conditional_Expression (N); begin -- When the node is inside a case/if expression, the lifetime of any @@ -14632,11 +14632,11 @@ package body Exp_Util is Map_Types (Parent_Type, Derived_Type); end Update_Primitives_Mapping; - ---------------------------------- - -- Within_Case_Or_If_Expression -- - ---------------------------------- + ----------------------------------- + -- Within_Conditional_Expression -- + ----------------------------------- - function Within_Case_Or_If_Expression (N : Node_Id) return Boolean is + function Within_Conditional_Expression (N : Node_Id) return Boolean is Nod : Node_Id; Par : Node_Id; @@ -14680,7 +14680,7 @@ package body Exp_Util is end loop; return False; - end Within_Case_Or_If_Expression; + end Within_Conditional_Expression; ------------------------------ -- Predicate_Check_In_Scope -- diff --git a/gcc/ada/exp_util.ads b/gcc/ada/exp_util.ads index 0872db2..751fb5b 100644 --- a/gcc/ada/exp_util.ads +++ b/gcc/ada/exp_util.ads @@ -1283,11 +1283,11 @@ package Exp_Util is -- when elaborating a contract for a subprogram, and when freezing a type -- extension to verify legality rules on inherited conditions. - function Within_Case_Or_If_Expression (N : Node_Id) return Boolean; + function Within_Conditional_Expression (N : Node_Id) return Boolean; -- Determine whether arbitrary node N is immediately within a dependent - -- expression of a case or an if expression. The criterion is whether + -- expression of a conditional expression. The criterion is whether -- temporaries created by the actions attached to N need to outlive an - -- enclosing case or if expression. + -- enclosing conditional expression. private pragma Inline (Duplicate_Subexpr); |