Skip to content

Commit 78615bd

Browse files
committed
Instrument.C_Utils: minor reformattings
TN: V728-002 Change-Id: Ia897f1aaab37f3d9f60d84d5d91ab14974613af0
1 parent d1b362c commit 78615bd

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

tools/gnatcov/instrument-c.adb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ package body Instrument.C is
451451
Deleted : Boolean := False;
452452
begin
453453
-- Check that no SCOs on the line of the annotation intersect
454-
-- the anntoation Sloc. If one does, discard the annotation and
454+
-- the annotation Sloc. If one does, discard the annotation and
455455
-- warn the user as this is not a supported use case.
456456

457457
if LI /= null and then LI.SCOs /= null

tools/gnatcov/instrument-c_utils.adb

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,13 @@ package body Instrument.C_Utils is
3434
----------
3535

3636
function Sloc (Loc : Source_Location_T) return Source_Location is
37-
Line : aliased Interfaces.C.unsigned;
38-
Column : aliased Interfaces.C.unsigned;
37+
Line, Column : aliased Interfaces.C.unsigned;
3938
begin
4039
Get_Presumed_Location (Location => Loc,
4140
Filename => null,
4241
Line => Line'Access,
4342
Column => Column'Access);
44-
return (Line => Langkit_Support.Slocs.Line_Number (Line),
43+
return (Line => Langkit_Support.Slocs.Line_Number (Line),
4544
Column => Langkit_Support.Slocs.Column_Number (Column));
4645
end Sloc;
4746

@@ -50,16 +49,15 @@ package body Instrument.C_Utils is
5049
----------------
5150

5251
function Start_Sloc (N : Cursor_T) return Source_Location is
53-
Line : aliased Interfaces.C.unsigned;
54-
Column : aliased Interfaces.C.unsigned;
55-
Loc : constant Source_Location_T :=
52+
Line, Column : aliased Interfaces.C.unsigned;
53+
Loc : constant Source_Location_T :=
5654
Get_Range_Start (Get_Cursor_Extent (N));
5755
begin
5856
Get_Presumed_Location (Location => Loc,
5957
Filename => null,
6058
Line => Line'Access,
6159
Column => Column'Access);
62-
return (Line => Langkit_Support.Slocs.Line_Number (Line),
60+
return (Line => Langkit_Support.Slocs.Line_Number (Line),
6361
Column => Langkit_Support.Slocs.Column_Number (Column));
6462
end Start_Sloc;
6563

@@ -68,9 +66,8 @@ package body Instrument.C_Utils is
6866
--------------
6967

7068
function End_Sloc (N : Cursor_T) return Source_Location is
71-
Line : aliased Interfaces.C.unsigned;
72-
Column : aliased Interfaces.C.unsigned;
73-
Loc : Source_Location_T :=
69+
Line, Column : aliased Interfaces.C.unsigned;
70+
Loc : Source_Location_T :=
7471
Get_Range_End (Get_Cursor_Extent (N));
7572
begin
7673
if Is_Macro_Location (Loc) then

tools/gnatcov/instrument-c_utils.ads

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
with Ada.Containers; use Ada.Containers;
2020
with Ada.Containers.Vectors;
2121

22-
with Clang.Index; use Clang.Index;
23-
with Clang.Rewrite; use Clang.Rewrite;
22+
with Clang.Index; use Clang.Index;
23+
with Clang.Rewrite; use Clang.Rewrite;
2424

2525
with Langkit_Support.Slocs; use Langkit_Support.Slocs;
2626

0 commit comments

Comments
 (0)