aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2023-02-01 21:47:32 +0100
committerMarc Poulhiès <poulhies@adacore.com>2023-05-26 09:29:15 +0200
commitda59893d855a2d10e9c94b57c9b2d4d91f05a140 (patch)
tree154d3519f52f41d656930d6fa9bf3956c2d4729d /gcc
parent8ba0b4cfeb518e4a4c5f3d3f8acc8cd700a05a93 (diff)
downloadgcc-da59893d855a2d10e9c94b57c9b2d4d91f05a140.zip
gcc-da59893d855a2d10e9c94b57c9b2d4d91f05a140.tar.gz
gcc-da59893d855a2d10e9c94b57c9b2d4d91f05a140.tar.bz2
ada: Refine types for an accessibility-checking routine
Code cleanup related to work on expression functions for GNATprove (which require accessibility checks even when they are not expanded and thus have no explicit return statements). gcc/ada/ * accessibility.adb (Is_Formal_Of_Current_Function): This routine expects an entity reference and not the entity itself, so its parameter is a Node_Id and not an Entity_Id.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/accessibility.adb4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/accessibility.adb b/gcc/ada/accessibility.adb
index c65c26d..bc897d1 100644
--- a/gcc/ada/accessibility.adb
+++ b/gcc/ada/accessibility.adb
@@ -1153,7 +1153,7 @@ package body Accessibility is
-- Obtain the first selector or choice from a given association
function Is_Formal_Of_Current_Function
- (Assoc_Expr : Entity_Id) return Boolean;
+ (Assoc_Expr : Node_Id) return Boolean;
-- Predicate to test if a given expression associated with a
-- discriminant is a formal parameter to the function in which the
-- return construct we checking applies to.
@@ -1180,7 +1180,7 @@ package body Accessibility is
-----------------------------------
function Is_Formal_Of_Current_Function
- (Assoc_Expr : Entity_Id) return Boolean is
+ (Assoc_Expr : Node_Id) return Boolean is
begin
return Is_Entity_Name (Assoc_Expr)
and then Enclosing_Subprogram