Skip to content

Commit 4504131

Browse files
committed
Merge branch 'topic/gnatformat' into 'master'
Update Ada sources after gnatformat formatting change See merge request eng/libadalang/langkit-query-language!446
2 parents f3a71be + 86a588b commit 4504131

File tree

6 files changed

+36
-36
lines changed

6 files changed

+36
-36
lines changed

lkql_checker/src/gnatcheck-compiler.adb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ package body Gnatcheck.Compiler is
4040

4141
type Message_Kinds is (Not_A_Message, Warning, Style, Restriction, Error);
4242

43-
function To_Mixed (A : String) return String
44-
renames GNAT.Case_Util.To_Mixed;
43+
function To_Mixed (A : String) return String renames
44+
GNAT.Case_Util.To_Mixed;
4545

4646
procedure Process_Style_Options (Param : String);
4747
-- Stores Param as parameter of the compiler -gnaty... option as is,
@@ -1342,8 +1342,8 @@ package body Gnatcheck.Compiler is
13421342
when '1' .. '9' =>
13431343
C := '0';
13441344

1345-
-- -gnatyLxx and -gnatyMxxx are represented respectively by
1346-
-- "L" and "M". Skip all digits directly after the flag.
1345+
-- -gnatyLxx and -gnatyMxxx are represented respectively by
1346+
-- "L" and "M". Skip all digits directly after the flag.
13471347

13481348
when 'L' | 'M' =>
13491349
while I < Param'Last and then Param (I + 1) in '0' .. '9'

lkql_checker/src/gnatcheck-diagnoses.adb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,8 +1142,8 @@ package body Gnatcheck.Diagnoses is
11421142
-- given params.
11431143
if Postponed_Param_Exempt_Sections.Contains (Id) then
11441144
declare
1145-
Exem_Sections : Parametrized_Exemption_Sections.Set
1146-
renames Postponed_Param_Exempt_Sections (Id) (SF);
1145+
Exem_Sections : Parametrized_Exemption_Sections.Set renames
1146+
Postponed_Param_Exempt_Sections (Id) (SF);
11471147
Param : constant String := Rule_Parameter (Diag, Rule);
11481148
pragma Assert (Param /= "" or else Rule = Warnings_Id);
11491149
begin

lkql_checker/src/gnatcheck-json_utilities.adb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ package body Gnatcheck.JSON_Utilities is
8181
and then Field_Value (Field_Value'First) = '['
8282
and then Field_Value (Field_Value'Last) = ']'
8383
then
84-
for C
85-
of Field_Value ((Field_Value'First + 1) .. (Field_Value'Last - 1))
84+
for C of
85+
Field_Value ((Field_Value'First + 1) .. (Field_Value'Last - 1))
8686
loop
8787
case C is
8888
when ',' =>

lkql_checker/src/gnatcheck-rules-rule_table.adb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,8 +1094,8 @@ package body Gnatcheck.Rules.Rule_Table is
10941094
end if;
10951095

10961096
declare
1097-
Tagged_Instance : Compiler_Instance
1098-
renames Compiler_Instance (Instance.all);
1097+
Tagged_Instance : Compiler_Instance renames
1098+
Compiler_Instance (Instance.all);
10991099
begin
11001100
while Word_Start /= 0 loop
11011101
Tagged_Instance.Arguments.Append
@@ -1231,8 +1231,8 @@ package body Gnatcheck.Rules.Rule_Table is
12311231
end if;
12321232

12331233
declare
1234-
Tagged_Instance : Compiler_Instance
1235-
renames Compiler_Instance (Instance.all);
1234+
Tagged_Instance : Compiler_Instance renames
1235+
Compiler_Instance (Instance.all);
12361236
begin
12371237
-- Restrictions rule expect a string list as argument
12381238
if R_Id = Restrictions_Id then
@@ -1319,8 +1319,8 @@ package body Gnatcheck.Rules.Rule_Table is
13191319
for Instance of All_Rule_Instances loop
13201320
if Is_Compiler_Rule (Instance.Rule) then
13211321
declare
1322-
Tagged_Instance : Compiler_Instance
1323-
renames Compiler_Instance (Instance.all);
1322+
Tagged_Instance : Compiler_Instance renames
1323+
Compiler_Instance (Instance.all);
13241324
begin
13251325
for Arg of Tagged_Instance.Arguments loop
13261326
if Instance.Rule = Restrictions_Id then

lkql_checker/src/gnatcheck-rules.adb

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,8 +1414,8 @@ package body Gnatcheck.Rules is
14141414
is
14151415
Instance : constant Rule_Instance_Access :=
14161416
Get_Or_Create_Instance (Rule, Instance_Name);
1417-
Tagged_Instance : One_Integer_Parameter_Instance
1418-
renames One_Integer_Parameter_Instance (Instance.all);
1417+
Tagged_Instance : One_Integer_Parameter_Instance renames
1418+
One_Integer_Parameter_Instance (Instance.all);
14191419
begin
14201420
-- If the param is empty and the command line is enabling the instance,
14211421
-- emit an error
@@ -1472,8 +1472,8 @@ package body Gnatcheck.Rules is
14721472
is
14731473
Instance : constant Rule_Instance_Access :=
14741474
Get_Or_Create_Instance (Rule, Instance_Name);
1475-
Tagged_Instance : One_Boolean_Parameter_Instance
1476-
renames One_Boolean_Parameter_Instance (Instance.all);
1475+
Tagged_Instance : One_Boolean_Parameter_Instance renames
1476+
One_Boolean_Parameter_Instance (Instance.all);
14771477
begin
14781478
-- If the param is empty, just enable or disable the instance
14791479
if Param = "" then
@@ -1521,8 +1521,8 @@ package body Gnatcheck.Rules is
15211521
is
15221522
Instance : constant Rule_Instance_Access :=
15231523
Get_Or_Create_Instance (Rule, Instance_Name);
1524-
Tagged_Instance : One_String_Parameter_Instance
1525-
renames One_String_Parameter_Instance (Instance.all);
1524+
Tagged_Instance : One_String_Parameter_Instance renames
1525+
One_String_Parameter_Instance (Instance.all);
15261526
begin
15271527
-- If the param is empty and the command line enable the instance, emit
15281528
-- an error message.
@@ -1580,8 +1580,8 @@ package body Gnatcheck.Rules is
15801580
is
15811581
Instance : constant Rule_Instance_Access :=
15821582
Get_Or_Create_Instance (Rule, Instance_Name);
1583-
Tagged_Instance : One_Array_Parameter_Instance
1584-
renames One_Array_Parameter_Instance (Instance.all);
1583+
Tagged_Instance : One_Array_Parameter_Instance renames
1584+
One_Array_Parameter_Instance (Instance.all);
15851585
begin
15861586
-- If the param is empty, just disable the instance following the
15871587
-- command line.
@@ -1664,8 +1664,8 @@ package body Gnatcheck.Rules is
16641664
is
16651665
Instance : constant Rule_Instance_Access :=
16661666
Get_Or_Create_Instance (Rule, Instance_Name);
1667-
Tagged_Instance : One_Integer_Or_Booleans_Parameter_Instance
1668-
renames One_Integer_Or_Booleans_Parameter_Instance (Instance.all);
1667+
Tagged_Instance : One_Integer_Or_Booleans_Parameter_Instance renames
1668+
One_Integer_Or_Booleans_Parameter_Instance (Instance.all);
16691669
Int_Param_Value : Integer;
16701670
Param_Found : Boolean := False;
16711671
begin
@@ -1757,8 +1757,8 @@ package body Gnatcheck.Rules is
17571757
is
17581758
Instance : constant Rule_Instance_Access :=
17591759
Get_Or_Create_Instance (Rule, Instance_Name);
1760-
Tagged_Instance : Identifier_Suffixes_Instance
1761-
renames Identifier_Suffixes_Instance (Instance.all);
1760+
Tagged_Instance : Identifier_Suffixes_Instance renames
1761+
Identifier_Suffixes_Instance (Instance.all);
17621762
Paren_Index : Natural;
17631763
Norm_Param : constant String := Remove_Spaces (Param);
17641764
Lower_Param : constant String := To_Lower (Param);
@@ -1886,8 +1886,8 @@ package body Gnatcheck.Rules is
18861886
is
18871887
Instance : constant Rule_Instance_Access :=
18881888
Get_Or_Create_Instance (Rule, Instance_Name);
1889-
Tagged_Instance : Identifier_Prefixes_Instance
1890-
renames Identifier_Prefixes_Instance (Instance.all);
1889+
Tagged_Instance : Identifier_Prefixes_Instance renames
1890+
Identifier_Prefixes_Instance (Instance.all);
18911891
Col_Index : Natural;
18921892
Norm_Param : constant String := Remove_Spaces (Param);
18931893
Lower_Param : constant String := To_Lower (Param);
@@ -2017,8 +2017,8 @@ package body Gnatcheck.Rules is
20172017
is
20182018
Instance : constant Rule_Instance_Access :=
20192019
Get_Or_Create_Instance (Rule, Instance_Name);
2020-
Tagged_Instance : Identifier_Casing_Instance
2021-
renames Identifier_Casing_Instance (Instance.all);
2020+
Tagged_Instance : Identifier_Casing_Instance renames
2021+
Identifier_Casing_Instance (Instance.all);
20222022
Norm_Param : constant String := To_Lower (Remove_Spaces (Param));
20232023

20242024
procedure Check_And_Set
@@ -2198,8 +2198,8 @@ package body Gnatcheck.Rules is
21982198
is
21992199
Instance : constant Rule_Instance_Access :=
22002200
Get_Or_Create_Instance (Rule, Instance_Name);
2201-
Tagged_Instance : Forbidden_Instance
2202-
renames Forbidden_Instance (Instance.all);
2201+
Tagged_Instance : Forbidden_Instance renames
2202+
Forbidden_Instance (Instance.all);
22032203
Lower_Param : constant String := To_Lower (Param);
22042204

22052205
procedure Process_Param
@@ -2302,8 +2302,8 @@ package body Gnatcheck.Rules is
23022302
is
23032303
Instance : constant Rule_Instance_Access :=
23042304
Get_Or_Create_Instance (Rule, Instance_Name);
2305-
Tagged_Instance : Silent_Exception_Handlers_Instance
2306-
renames Silent_Exception_Handlers_Instance (Instance.all);
2305+
Tagged_Instance : Silent_Exception_Handlers_Instance renames
2306+
Silent_Exception_Handlers_Instance (Instance.all);
23072307

23082308
procedure Add_To (Str : in out Unbounded_Wide_Wide_String; Val : String);
23092309
-- Add `Val` to `Str`, separated with ","

lkql_checker/src/gnatcheck-source_table.adb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,8 +1506,8 @@ package body Gnatcheck.Source_Table is
15061506
declare
15071507
use Checker_App;
15081508

1509-
Root_Node_Type : LKI.Type_Ref
1510-
renames LKI.Root_Node_Type (Ada_Lang_Id);
1509+
Root_Node_Type : LKI.Type_Ref renames
1510+
LKI.Root_Node_Type (Ada_Lang_Id);
15111511
subtype Rules_By_Kind_Array_Subt is
15121512
Rules_By_Kind_Array
15131513
(LKI.To_Index (Root_Node_Type)

0 commit comments

Comments
 (0)