-- 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);
-- 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
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;
end loop;
return False;
- end Within_Case_Or_If_Expression;
+ end Within_Conditional_Expression;
------------------------------
-- Predicate_Check_In_Scope --
-- 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);