aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2021-03-09 17:36:15 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2021-06-17 10:32:12 -0400
commitf59ca9eee842a3a1b213da220331e7d4be454486 (patch)
treed0ad037e441407d34e41c163c1d44587bc3599e4 /gcc
parent54f039c9349a246a035d62b2de5b7404d70c502b (diff)
downloadgcc-f59ca9eee842a3a1b213da220331e7d4be454486.zip
gcc-f59ca9eee842a3a1b213da220331e7d4be454486.tar.gz
gcc-f59ca9eee842a3a1b213da220331e7d4be454486.tar.bz2
[Ada] Use source casing in messages for aliasing checks
gcc/ada/ * checks.adb (Overlap_Check): Replace Set_Casing with Adjust_Name_Case and adapt surrounding code as needed.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/checks.adb20
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/ada/checks.adb b/gcc/ada/checks.adb
index d8cdb64..b46526e 100644
--- a/gcc/ada/checks.adb
+++ b/gcc/ada/checks.adb
@@ -24,7 +24,6 @@
------------------------------------------------------------------------------
with Atree; use Atree;
-with Casing; use Casing;
with Debug; use Debug;
with Einfo; use Einfo;
with Einfo.Entities; use Einfo.Entities;
@@ -2417,9 +2416,8 @@ package body Checks is
Formal_2 : Entity_Id;
Check : in out Node_Id)
is
- Cond : Node_Id;
- ID_Casing : constant Casing_Type :=
- Identifier_Casing (Source_Index (Current_Sem_Unit));
+ Cond : Node_Id;
+ Formal_Name : Bounded_String;
begin
-- Generate:
@@ -2451,15 +2449,17 @@ package body Checks is
Store_String_Chars ("aliased parameters, actuals for """);
- Get_Name_String (Chars (Formal_1));
- Set_Casing (ID_Casing);
- Store_String_Chars (Name_Buffer (1 .. Name_Len));
+ Append (Formal_Name, Chars (Formal_1));
+ Adjust_Name_Case (Formal_Name, Sloc (Formal_1));
+ Store_String_Chars (To_String (Formal_Name));
Store_String_Chars (""" and """);
- Get_Name_String (Chars (Formal_2));
- Set_Casing (ID_Casing);
- Store_String_Chars (Name_Buffer (1 .. Name_Len));
+ Formal_Name.Length := 0;
+
+ Append (Formal_Name, Chars (Formal_2));
+ Adjust_Name_Case (Formal_Name, Sloc (Formal_2));
+ Store_String_Chars (To_String (Formal_Name));
Store_String_Chars (""" overlap");