diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2021-05-28 14:53:21 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-07-09 12:35:24 +0000 |
commit | 8a13a0017e52979c4b55f4c6294f4794882a9ce7 (patch) | |
tree | 76f9ccf8bc8fef7536d66db2936419ec6ff1a522 | |
parent | 8bab88ba7bec025ef9db7ed5cb8d525fceab8636 (diff) | |
download | gcc-8a13a0017e52979c4b55f4c6294f4794882a9ce7.zip gcc-8a13a0017e52979c4b55f4c6294f4794882a9ce7.tar.gz gcc-8a13a0017e52979c4b55f4c6294f4794882a9ce7.tar.bz2 |
[Ada] Avoid repeated calls in analysis of expression functions
gcc/ada/
* sem_ch6.adb (Analyze_Expression_Function): Use Orig_N variable
instead of repeated calls to Original_Node.
-rw-r--r-- | gcc/ada/sem_ch6.adb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 6bc72d6..ed76808 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -561,7 +561,7 @@ package body Sem_Ch6 is Push_Scope (Def_Id); Install_Formals (Def_Id); Preanalyze_Formal_Expression (Expr, Typ); - Check_Limited_Return (Original_Node (N), Expr, Typ); + Check_Limited_Return (Orig_N, Expr, Typ); End_Scope; end if; @@ -630,7 +630,7 @@ package body Sem_Ch6 is Check_Dynamically_Tagged_Expression (Expr => Expr, Typ => Etype (Def_Id), - Related_Nod => Original_Node (N)); + Related_Nod => Orig_N); end if; -- We must enforce checks for unreferenced formals in our newly |