aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/sem_util.ads
diff options
context:
space:
mode:
authorYannick Moy <moy@adacore.com>2011-08-02 10:21:47 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-02 12:21:47 +0200
commite24329cdf00e258cfb48e84f55bbd4903cc48939 (patch)
tree6e6be6347d2e4a0f8831778d9a190954fe41d3cf /gcc/ada/sem_util.ads
parent176dadf6396a67fb74572ceb74c1e66520adbd51 (diff)
downloadgcc-e24329cdf00e258cfb48e84f55bbd4903cc48939.zip
gcc-e24329cdf00e258cfb48e84f55bbd4903cc48939.tar.gz
gcc-e24329cdf00e258cfb48e84f55bbd4903cc48939.tar.bz2
par-ch6.adb: Correct obsolete name in comments
2011-08-02 Yannick Moy <moy@adacore.com> * par-ch6.adb: Correct obsolete name in comments * restrict.adb, restrict.ads (Check_Formal_Restriction): new function which takes two message arguments (existing function takes one), with second message used for continuation. * sem_ch5.adb (Analyze_Block_Statement): in formal mode, only reject block statements that originate from a source block statement, not generated block statements * sem_ch6.adb (Analyze_Function_Call): rename L into Actuals, for symmetry with procedure case * sem_ch7.adb (Check_One_Tagged_Type_Or_Extension_At_Most): new function to issue an error in formal mode if a package specification contains more than one tagged type or type extension. * sem_res.adb (Resolve_Actuals): in formal mode, check that actual parameters matching formals of tagged types are objects (or ancestor type conversions of objects), not general expressions. Issue an error on view conversions that are not involving ancestor conversion of an extended type. (Resolve_Type_Conversion): in formal mode, issue an error on the operand of an ancestor type conversion which is not an object * sem_util.adb, sem_util.ads (Find_Actual): extend the behavior of the procedure so that it works also for actuals of function calls (Is_Actual_Tagged_Parameter): new function which determines if its argument is an actual parameter of a formal of tagged type in a subprogram call (Is_SPARK_Object_Reference): new function which determines if the tree referenced by its argument represents an object in SPARK From-SVN: r177125
Diffstat (limited to 'gcc/ada/sem_util.ads')
-rw-r--r--gcc/ada/sem_util.ads19
1 files changed, 13 insertions, 6 deletions
diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads
index 6410db4..c908d88 100644
--- a/gcc/ada/sem_util.ads
+++ b/gcc/ada/sem_util.ads
@@ -353,12 +353,12 @@ package Sem_Util is
(N : Node_Id;
Formal : out Entity_Id;
Call : out Node_Id);
- -- Determines if the node N is an actual parameter of a procedure call. If
- -- so, then Formal points to the entity for the formal (whose Ekind is one
- -- of E_In_Parameter, E_Out_Parameter, E_In_Out_Parameter) and Call is set
- -- to the node for the corresponding call. If the node N is not an actual
- -- parameter, or is an actual parameter of a function call, then Formal and
- -- Call are set to Empty.
+ -- Determines if the node N is an actual parameter of a function of a
+ -- procedure call. If so, then Formal points to the entity for the formal
+ -- (whose Ekind is one of E_In_Parameter, E_Out_Parameter,
+ -- E_In_Out_Parameter) and Call is set to the node for the corresponding
+ -- call. If the node N is not an actual parameter then Formal and Call are
+ -- set to Empty.
function Find_Corresponding_Discriminant
(Id : Node_Id;
@@ -677,6 +677,10 @@ package Sem_Util is
function Is_Actual_Parameter (N : Node_Id) return Boolean;
-- Determines if N is an actual parameter in a subprogram call
+ function Is_Actual_Tagged_Parameter (N : Node_Id) return Boolean;
+ -- Determines if N is an actual parameter of a formal of tagged type in a
+ -- subprogram call.
+
function Is_Aliased_View (Obj : Node_Id) return Boolean;
-- Determine if Obj is an aliased view, i.e. the name of an object to which
-- 'Access or 'Unchecked_Access can apply.
@@ -763,6 +767,9 @@ package Sem_Util is
-- Determines if the tree referenced by N represents an object. Both
-- variable and constant objects return True (compare Is_Variable).
+ function Is_SPARK_Object_Reference (N : Node_Id) return Boolean;
+ -- Determines if the tree referenced by N represents an object in SPARK.
+
function Is_OK_Variable_For_Out_Formal (AV : Node_Id) return Boolean;
-- Used to test if AV is an acceptable formal for an OUT or IN OUT formal.
-- Note that the Is_Variable function is not quite the right test because