aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2020-12-01 12:03:10 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2021-05-03 05:28:28 -0400
commit94f994283846fa3f01d7b6556b59da5509a55a60 (patch)
treed2bad10892ffa035cedbccd85f1723ca88d68687
parent3bcf8298d767a39e7f5226cc9edc6f7cae2980a7 (diff)
downloadgcc-94f994283846fa3f01d7b6556b59da5509a55a60.zip
gcc-94f994283846fa3f01d7b6556b59da5509a55a60.tar.gz
gcc-94f994283846fa3f01d7b6556b59da5509a55a60.tar.bz2
[Ada] Reuse a wrapper for Resolve with implicit type where possible
gcc/ada/ * sem_attr.adb (Analyze_Attribute): Reuse Resolve with implicit type when analysing attribute Priority. * sem_ch5.adb (Analyze_Case_Statement): Likewise for a rare case in analysis of case statements. (Analyze_Iterator_Specification): Likewise for non-overloaded domain of iteration.
-rw-r--r--gcc/ada/sem_attr.adb2
-rw-r--r--gcc/ada/sem_ch5.adb4
2 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index a4ecf6b..51bedb5 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -5376,7 +5376,7 @@ package body Sem_Attr is
or else (Is_Access_Type (Etype (P))
and then Is_Protected_Type (Designated_Type (Etype (P))))
then
- Resolve (P, Etype (P));
+ Resolve (P);
else
Error_Attr_P ("prefix of % attribute must be a protected object");
end if;
diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
index ccde8a5..f03467f 100644
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -1509,7 +1509,7 @@ package body Sem_Ch5 is
and then Present (Full_View (Etype (Exp)))
and then Is_Discrete_Type (Full_View (Etype (Exp)))
then
- Resolve (Exp, Etype (Exp));
+ Resolve (Exp);
Exp_Type := Full_View (Etype (Exp));
else
@@ -2360,7 +2360,7 @@ package body Sem_Ch5 is
-- Domain of iteration is not overloaded
else
- Resolve (Iter_Name, Etype (Iter_Name));
+ Resolve (Iter_Name);
end if;
if not Of_Present (N) then