Skip to content

Commit c91f7a6

Browse files
author
automatic-merge
committed
Merge remote branch 'origin/master' into edge
2 parents 7d1ecfc + 84f84ef commit c91f7a6

File tree

9 files changed

+922
-1
lines changed

9 files changed

+922
-1
lines changed

source/gnatdoc-comments-helpers.adb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,13 @@ package body GNATdoc.Comments.Helpers is
528528
Comment : Structured_Comment;
529529

530530
begin
531+
-- Synthetic declarations doesn't have nor code snippets nor
532+
-- documentation.
533+
534+
if Name.P_Basic_Decl.Kind = Ada_Synthetic_Subp_Decl then
535+
return;
536+
end if;
537+
531538
-- LAL 20250922: `P_Most_Visible_Part` returns `null` for named
532539
-- numbers.
533540

source/gnatdoc-comments-helpers.ads

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ package GNATdoc.Comments.Helpers is
2828
Origin : Libadalang.Analysis.Ada_Node'Class;
2929
Options : GNATdoc.Comments.Options.Extractor_Options;
3030
Code_Snippet : out VSS.String_Vectors.Virtual_String_Vector;
31-
Documentation : out VSS.String_Vectors.Virtual_String_Vector);
31+
Documentation : out VSS.String_Vectors.Virtual_String_Vector)
32+
with Pre => not Name.Is_Null;
3233
-- Return code snippet and documentation for the given node in plain text
3334
-- format.
3435
--

testsuite/als_helper/locations.json

Lines changed: 226 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,232 @@
131131
{"file": "exceptions_package.adb", "line": 8, "column": 16},
132132
// reference of the exception
133133

134+
{"file": "synthetics.adb", "line": 11, "column": 15},
135+
// reference of synthetic `"="` subprogram of `Implicit_Record`
136+
{"file": "synthetics.adb", "line": 15, "column": 15},
137+
// reference of synthetic `"/="` subprogram of `Implicit_Record`
138+
{"file": "synthetics_package.adb", "line": 12, "column": 15},
139+
// reference of synthetic `"="` subprogram of `Implicit_Record`
140+
{"file": "synthetics_package.adb", "line": 16, "column": 15},
141+
// reference of synthetic `"/="` subprogram of `Implicit_Record`
142+
143+
{"file": "synthetics.adb", "line": 25, "column": 15},
144+
// reference of synthetic `"="` subprogram of `Derived_Implicit_Record`
145+
{"file": "synthetics.adb", "line": 29, "column": 15},
146+
// reference of synthetic `"/="` subprogram of `Derived_Implicit_Record`
147+
{"file": "synthetics_package.adb", "line": 26, "column": 15},
148+
// reference of synthetic `"="` subprogram of `Derived_Implicit_Record`
149+
{"file": "synthetics_package.adb", "line": 30, "column": 15},
150+
// reference of synthetic `"/="` subprogram of `Derived_Implicit_Record`
151+
152+
{"file": "synthetics.adb", "line": 39, "column": 15},
153+
// reference of synthetic `"="` subprogram of `Explicit_Record`
154+
{"file": "synthetics.adb", "line": 43, "column": 15},
155+
// reference of synthetic `"/="` subprogram of `Explicit_Record`
156+
{"file": "synthetics_package.adb", "line": 40, "column": 15},
157+
// reference of synthetic `"="` subprogram of `Explicit_Record`
158+
{"file": "synthetics_package.adb", "line": 44, "column": 15},
159+
// reference of synthetic `"/="` subprogram of `Explicit_Record`
160+
161+
{"file": "synthetics.adb", "line": 53, "column": 15},
162+
// reference of synthetic `"="` subprogram of `Derived_Explicit_Record`
163+
{"file": "synthetics.adb", "line": 57, "column": 15},
164+
// reference of synthetic `"/="` subprogram of `Derived_Explicit_Record`
165+
{"file": "synthetics_package.adb", "line": 54, "column": 15},
166+
// reference of synthetic `"="` subprogram of `Derived_Explicit_Record`
167+
{"file": "synthetics_package.adb", "line": 58, "column": 15},
168+
// reference of synthetic `"/="` subprogram of `Derived_Explicit_Record`
169+
170+
{"file": "synthetics.adb", "line": 70, "column": 15},
171+
// reference of synthetic `"abs"` subprogram of `Integer_32`
172+
{"file": "synthetics_package.adb", "line": 71, "column": 15},
173+
// reference of synthetic `"abs"` subprogram of `Integer_32`
174+
175+
{"file": "synthetics.adb", "line": 71, "column": 17},
176+
// reference of synthetic `"/"` subprogram of `Integer_32`
177+
{"file": "synthetics_package.adb", "line": 72, "column": 17},
178+
// reference of synthetic `"/"` subprogram of `Integer_32`
179+
180+
{"file": "synthetics.adb", "line": 66, "column": 15},
181+
// reference of synthetic `">"` subprogram of `Integer_32`
182+
{"file": "synthetics_package.adb", "line": 67, "column": 15},
183+
// reference of synthetic `">"` subprogram of `Integer_32`
184+
185+
{"file": "synthetics.adb", "line": 66, "column": 24},
186+
// reference of synthetic `">="` subprogram of `Integer_32`
187+
{"file": "synthetics_package.adb", "line": 67, "column": 24},
188+
// reference of synthetic `">="` subprogram of `Integer_32`
189+
190+
{"file": "synthetics.adb", "line": 66, "column": 34},
191+
// reference of synthetic `"<"` subprogram of `Integer_32`
192+
{"file": "synthetics_package.adb", "line": 67, "column": 34},
193+
// reference of synthetic `"<"` subprogram of `Integer_32`
194+
195+
{"file": "synthetics.adb", "line": 66, "column": 43},
196+
// reference of synthetic `"<="` subprogram of `Integer_32`
197+
{"file": "synthetics_package.adb", "line": 67, "column": 43},
198+
// reference of synthetic `"<="` subprogram of `Integer_32`
199+
200+
{"file": "synthetics.adb", "line": 72, "column": 17},
201+
// reference of synthetic `"-"` subprogram of `Integer_32`
202+
{"file": "synthetics_package.adb", "line": 73, "column": 17},
203+
// reference of synthetic `"-"` subprogram of `Integer_32`
204+
205+
{"file": "synthetics.adb", "line": 73, "column": 15},
206+
// reference of synthetic `"-"` subprogram of `Integer_32`
207+
{"file": "synthetics_package.adb", "line": 74, "column": 15},
208+
// reference of synthetic `"-"` subprogram of `Integer_32`
209+
210+
{"file": "synthetics.adb", "line": 74, "column": 17},
211+
// reference of synthetic `"mod"` subprogram of `Integer_32`
212+
{"file": "synthetics_package.adb", "line": 75, "column": 17},
213+
// reference of synthetic `"mod"` subprogram of `Integer_32`
214+
215+
{"file": "synthetics.adb", "line": 75, "column": 17},
216+
// reference of synthetic `"*"` subprogram of `Integer_32`
217+
{"file": "synthetics_package.adb", "line": 76, "column": 17},
218+
// reference of synthetic `"*"` subprogram of `Integer_32`
219+
220+
{"file": "synthetics.adb", "line": 76, "column": 17},
221+
// reference of synthetic `"+"` subprogram of `Integer_32`
222+
{"file": "synthetics_package.adb", "line": 77, "column": 17},
223+
// reference of synthetic `"+"` subprogram of `Integer_32`
224+
225+
{"file": "synthetics.adb", "line": 77, "column": 15},
226+
// reference of synthetic `"+"` subprogram of `Integer_32`
227+
{"file": "synthetics_package.adb", "line": 78, "column": 15},
228+
// reference of synthetic `"+"` subprogram of `Integer_32`
229+
230+
{"file": "synthetics.adb", "line": 78, "column": 17},
231+
// reference of synthetic `"**"` subprogram of `Integer_32`
232+
{"file": "synthetics_package.adb", "line": 79, "column": 17},
233+
// reference of synthetic `"**"` subprogram of `Integer_32`
234+
235+
{"file": "synthetics.adb", "line": 79, "column": 17},
236+
// reference of synthetic `"rem"` subprogram of `Integer_32`
237+
{"file": "synthetics_package.adb", "line": 80, "column": 17},
238+
// reference of synthetic `"rem"` subprogram of `Integer_32`
239+
240+
{"file": "synthetics.adb", "line": 90, "column": 15},
241+
// reference of synthetic `"abs"` subprogram of `Derived_Integer_32`
242+
{"file": "synthetics_package.adb", "line": 91, "column": 15},
243+
// reference of synthetic `"abs"` subprogram of `Derived_Integer_32`
244+
245+
{"file": "synthetics.adb", "line": 91, "column": 17},
246+
// reference of synthetic `"/"` subprogram of `Derived_Integer_32`
247+
{"file": "synthetics_package.adb", "line": 92, "column": 17},
248+
// reference of synthetic `"/"` subprogram of `Derived_Integer_32`
249+
250+
{"file": "synthetics.adb", "line": 86, "column": 15},
251+
// reference of synthetic `">"` subprogram of `Derived_Integer_32`
252+
{"file": "synthetics_package.adb", "line": 87, "column": 15},
253+
// reference of synthetic `">"` subprogram of `Derived_Integer_32`
254+
255+
{"file": "synthetics.adb", "line": 86, "column": 24},
256+
// reference of synthetic `">="` subprogram of `Derived_Integer_32`
257+
{"file": "synthetics_package.adb", "line": 87, "column": 24},
258+
// reference of synthetic `">="` subprogram of `Derived_Integer_32`
259+
260+
{"file": "synthetics.adb", "line": 86, "column": 34},
261+
// reference of synthetic `"<"` subprogram of `Derived_Integer_32`
262+
{"file": "synthetics_package.adb", "line": 87, "column": 34},
263+
// reference of synthetic `"<"` subprogram of `Derived_Integer_32`
264+
265+
{"file": "synthetics.adb", "line": 86, "column": 43},
266+
// reference of synthetic `"<="` subprogram of `Derived_Integer_32`
267+
{"file": "synthetics_package.adb", "line": 87, "column": 43},
268+
// reference of synthetic `"<="` subprogram of `Derived_Integer_32`
269+
270+
{"file": "synthetics.adb", "line": 92, "column": 17},
271+
// reference of synthetic `"-"` subprogram of `Derived_Integer_32`
272+
{"file": "synthetics_package.adb", "line": 93, "column": 17},
273+
// reference of synthetic `"-"` subprogram of `Derived_Integer_32`
274+
275+
{"file": "synthetics.adb", "line": 93, "column": 15},
276+
// reference of synthetic `"-"` subprogram of `Derived_Integer_32`
277+
{"file": "synthetics_package.adb", "line": 94, "column": 15},
278+
// reference of synthetic `"-"` subprogram of `Derived_Integer_32`
279+
280+
{"file": "synthetics.adb", "line": 94, "column": 17},
281+
// reference of synthetic `"mod"` subprogram of `Derived_Integer_32`
282+
{"file": "synthetics_package.adb", "line": 95, "column": 17},
283+
// reference of synthetic `"mod"` subprogram of `Derived_Integer_32`
284+
285+
{"file": "synthetics.adb", "line": 95, "column": 17},
286+
// reference of synthetic `"*"` subprogram of `Derived_Integer_32`
287+
{"file": "synthetics_package.adb", "line": 96, "column": 17},
288+
// reference of synthetic `"*"` subprogram of `Derived_Integer_32`
289+
290+
{"file": "synthetics.adb", "line": 96, "column": 17},
291+
// reference of synthetic `"+"` subprogram of `Derived_Integer_32`
292+
{"file": "synthetics_package.adb", "line": 97, "column": 17},
293+
// reference of synthetic `"+"` subprogram of `Derived_Integer_32`
294+
295+
{"file": "synthetics.adb", "line": 97, "column": 15},
296+
// reference of synthetic `"+"` subprogram of `Derived_Integer_32`
297+
{"file": "synthetics_package.adb", "line": 98, "column": 15},
298+
// reference of synthetic `"+"` subprogram of `Derived_Integer_32`
299+
300+
{"file": "synthetics.adb", "line": 98, "column": 17},
301+
// reference of synthetic `"**"` subprogram of `Derived_Integer_32`
302+
{"file": "synthetics_package.adb", "line": 99, "column": 17},
303+
// reference of synthetic `"**"` subprogram of `Derived_Integer_32`
304+
305+
{"file": "synthetics.adb", "line": 99, "column": 17},
306+
// reference of synthetic `"rem"` subprogram of `Derived_Integer_32`
307+
{"file": "synthetics_package.adb", "line": 100, "column": 17},
308+
// reference of synthetic `"rem"` subprogram of `Derived_Integer_32`
309+
310+
{"file": "synthetics.adb", "line": 106, "column": 17},
311+
// reference of synthetic `"and"` subprogram of `Integer_32`
312+
{"file": "synthetics_package.adb", "line": 107, "column": 17},
313+
// reference of synthetic `"and"` subprogram of `Integer_32`
314+
315+
{"file": "synthetics.adb", "line": 107, "column": 15},
316+
// reference of synthetic `"not"` subprogram of `Integer_32`
317+
{"file": "synthetics_package.adb", "line": 108, "column": 15},
318+
// reference of synthetic `"not"` subprogram of `Integer_32`
319+
320+
{"file": "synthetics.adb", "line": 108, "column": 17},
321+
// reference of synthetic `"or"` subprogram of `Integer_32`
322+
{"file": "synthetics_package.adb", "line": 109, "column": 17},
323+
// reference of synthetic `"or"` subprogram of `Integer_32`
324+
325+
{"file": "synthetics.adb", "line": 109, "column": 17},
326+
// reference of synthetic `"xor"` subprogram of `Integer_32`
327+
{"file": "synthetics_package.adb", "line": 110, "column": 17},
328+
// reference of synthetic `"xor"` subprogram of `Integer_32`
329+
330+
{"file": "synthetics.adb", "line": 116, "column": 17},
331+
// reference of synthetic `"and"` subprogram of `Integer_32`
332+
{"file": "synthetics_package.adb", "line": 117, "column": 17},
333+
// reference of synthetic `"and"` subprogram of `Integer_32`
334+
335+
{"file": "synthetics.adb", "line": 117, "column": 15},
336+
// reference of synthetic `"not"` subprogram of `Integer_32`
337+
{"file": "synthetics_package.adb", "line": 118, "column": 15},
338+
// reference of synthetic `"not"` subprogram of `Integer_32`
339+
340+
{"file": "synthetics.adb", "line": 118, "column": 17},
341+
// reference of synthetic `"or"` subprogram of `Integer_32`
342+
{"file": "synthetics_package.adb", "line": 119, "column": 17},
343+
// reference of synthetic `"or"` subprogram of `Integer_32`
344+
345+
{"file": "synthetics.adb", "line": 119, "column": 17},
346+
// reference of synthetic `"xor"` subprogram of `Integer_32`
347+
{"file": "synthetics_package.adb", "line": 120, "column": 17},
348+
// reference of synthetic `"xor"` subprogram of `Integer_32`
349+
350+
{"file": "synthetics.adb", "line": 125, "column": 36},
351+
// reference of synthetic `"&"` subprogram of `Integer_32`
352+
{"file": "synthetics_package.adb", "line": 126, "column": 36},
353+
// reference of synthetic `"&"` subprogram of `Integer_32`
354+
355+
{"file": "synthetics.adb", "line": 134, "column": 44},
356+
// reference of synthetic `"&"` subprogram of `Integer_32`
357+
{"file": "synthetics_package.adb", "line": 135, "column": 44},
358+
// reference of synthetic `"&"` subprogram of `Integer_32`
359+
134360
// {"file": "pkg1.ads", "line": 5, "column": 9}, // package specification name
135361
// {"file": "pkg1.ads", "line": 9, "column": 5}, // package specification end name
136362
// {"file": "pkg1.adb", "line": 5, "column": 14}, // package body name
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
2+
package body Synthetics is
3+
4+
procedure Dummy is
5+
begin
6+
declare
7+
A : Implicit_Record;
8+
B : Implicit_Record;
9+
10+
begin
11+
if A = B then
12+
null;
13+
end if;
14+
15+
if A /= B then
16+
null;
17+
end if;
18+
end;
19+
20+
declare
21+
A : Derived_Implicit_Record;
22+
B : Derived_Implicit_Record;
23+
24+
begin
25+
if A = B then
26+
null;
27+
end if;
28+
29+
if A /= B then
30+
null;
31+
end if;
32+
end;
33+
34+
declare
35+
A : Explicit_Record;
36+
B : Explicit_Record;
37+
38+
begin
39+
if A = B then
40+
null;
41+
end if;
42+
43+
if A /= B then
44+
null;
45+
end if;
46+
end;
47+
48+
declare
49+
A : Derived_Explicit_Record;
50+
B : Derived_Explicit_Record;
51+
52+
begin
53+
if A = B then
54+
null;
55+
end if;
56+
57+
if A /= B then
58+
null;
59+
end if;
60+
end;
61+
62+
declare
63+
A : Integer_32 := -1;
64+
65+
begin
66+
if A > 3 or A >= 3 or A < 3 or A <= 3 then
67+
null;
68+
end if;
69+
70+
A := abs A;
71+
A := A / 2;
72+
A := A - 2;
73+
A := -A;
74+
A := A mod 3;
75+
A := A * 5;
76+
A := A + 3;
77+
A := +A;
78+
A := A ** 7;
79+
A := A rem 4;
80+
end;
81+
82+
declare
83+
A : Derived_Integer_32 := -1;
84+
85+
begin
86+
if A > 3 or A >= 3 or A < 3 or A <= 3 then
87+
null;
88+
end if;
89+
90+
A := abs A;
91+
A := A / 2;
92+
A := A - 2;
93+
A := -A;
94+
A := A mod 3;
95+
A := A * 5;
96+
A := A + 3;
97+
A := +A;
98+
A := A ** 7;
99+
A := A rem 4;
100+
end;
101+
102+
declare
103+
A : Unsigned_32 := 5;
104+
105+
begin
106+
A := A and 10;
107+
A := not A;
108+
A := A or 15;
109+
A := A xor 31;
110+
end;
111+
112+
declare
113+
A : Derived_Unsigned_32 := 5;
114+
115+
begin
116+
A := A and 10;
117+
A := not A;
118+
A := A or 15;
119+
A := A xor 31;
120+
end;
121+
122+
declare
123+
A : Integer_32_Array := (1, 2);
124+
B : Integer_32_Array := (3, 4, 5);
125+
C : Integer_32_Array := A & B;
126+
127+
begin
128+
null;
129+
end;
130+
131+
declare
132+
A : Derived_Integer_32_Array := (1, 2);
133+
B : Derived_Integer_32_Array := (3, 4, 5);
134+
C : Derived_Integer_32_Array := A & B;
135+
136+
begin
137+
null;
138+
end;
139+
end Dummy;
140+
141+
end Synthetics;

0 commit comments

Comments
 (0)