diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2021-03-02 15:37:36 +0100 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-06-16 04:43:02 -0400 |
commit | 7ef1d8e88bb7aa9fa148a63bec25b740b5d997c8 (patch) | |
tree | 4ee1830146750c226cb55607a201dbd98f3d5534 | |
parent | 37cd8d97f3aa779197eb103d1e4b4d0ac63adc4a (diff) | |
download | gcc-7ef1d8e88bb7aa9fa148a63bec25b740b5d997c8.zip gcc-7ef1d8e88bb7aa9fa148a63bec25b740b5d997c8.tar.gz gcc-7ef1d8e88bb7aa9fa148a63bec25b740b5d997c8.tar.bz2 |
[Ada] Adapt Is_Actual_Parameter to also work for entry parameters
gcc/ada/
* sem_util.ads (Is_Actual_Parameter): Update comment.
* sem_util.adb (Is_Actual_Parameter): Also detect entry parameters.
-rw-r--r-- | gcc/ada/sem_util.adb | 4 | ||||
-rw-r--r-- | gcc/ada/sem_util.ads | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index aa24493..74637ec 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -15467,7 +15467,9 @@ package body Sem_Util is when N_Parameter_Association => return N = Explicit_Actual_Parameter (Parent (N)); - when N_Subprogram_Call => + when N_Entry_Call_Statement + | N_Subprogram_Call + => return Is_List_Member (N) and then List_Containing (N) = Parameter_Associations (Parent (N)); diff --git a/gcc/ada/sem_util.ads b/gcc/ada/sem_util.ads index a986ae6..904821a 100644 --- a/gcc/ada/sem_util.ads +++ b/gcc/ada/sem_util.ads @@ -1726,7 +1726,7 @@ package Sem_Util is -- subprogram call. function Is_Actual_Parameter (N : Node_Id) return Boolean; - -- Determines if N is an actual parameter in a subprogram call + -- Determines if N is an actual parameter in a subprogram or entry 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 |