Skip to content

Commit d222406

Browse files
author
automatic-merge
committed
Merge remote branch 'origin/master' into edge
2 parents c91f7a6 + 4f8b01e commit d222406

File tree

6 files changed

+893
-5
lines changed

6 files changed

+893
-5
lines changed

source/gnatdoc-comments-helpers.adb

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -535,13 +535,20 @@ package body GNATdoc.Comments.Helpers is
535535
return;
536536
end if;
537537

538-
-- LAL 20250922: `P_Most_Visible_Part` returns `null` for named
539-
-- numbers.
540-
541538
if Most_Visible_Decl.Is_Null then
542539
if Name.P_Basic_Decl.Kind = Ada_Number_Decl then
540+
-- LAL 20250922: `P_Most_Visible_Part` returns `null` for named
541+
-- numbers.
542+
543543
Most_Visible_Decl := Name.As_Defining_Name;
544544

545+
elsif Origin.Kind = Ada_Op_Eq then
546+
-- LAL 20250922: `P_Most_Visible_Part` returns `null` when
547+
-- `"="` function is declared in the private part of the package
548+
-- specification. Use first part to improve user experience.
549+
550+
Most_Visible_Decl := All_Decls (All_Decls'First);
551+
545552
else
546553
raise Program_Error;
547554
end if;

testsuite/als_helper/locations.json

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,138 @@
357357
{"file": "synthetics_package.adb", "line": 135, "column": 44},
358358
// reference of synthetic `"&"` subprogram of `Integer_32`
359359

360+
361+
{"file": "synthetics.adb", "line": 145, "column": 15},
362+
// reference of synthetic `"&"` subprogram of `Integer_32`
363+
{"file": "synthetics_package.adb", "line": 146, "column": 15},
364+
// reference of synthetic `"&"` subprogram of `Integer_32`
365+
366+
// {"file": "synthetics.adb", "line": 134, "column": 44},
367+
// reference of synthetic `"&"` subprogram of `Integer_32`
368+
{"file": "synthetics_package.adb", "line": 146, "column": 24},
369+
// reference of synthetic `"&"` subprogram of `Integer_32`
370+
371+
{"file": "synthetics.adb", "line": 145, "column": 15},
372+
// reference of synthetic `"="` subprogram of `Tagged_Default`
373+
{"file": "synthetics_package.adb", "line": 146, "column": 15},
374+
// reference of synthetic `"="` subprogram of `Tagged_Default`
375+
376+
{"file": "synthetics.adb", "line": 145, "column": 24},
377+
// reference of synthetic `"/="` subprogram of `Tagged_Default`
378+
{"file": "synthetics_package.adb", "line": 146, "column": 24},
379+
// reference of synthetic `"/="` subprogram of `Tagged_Default`
380+
381+
{"file": "synthetics.adb", "line": 155, "column": 15},
382+
// reference of synthetic `"="` subprogram of `Derived_Tagged_Default`
383+
{"file": "synthetics_package.adb", "line": 156, "column": 15},
384+
// reference of synthetic `"="` subprogram of `Derived_Tagged_Default`
385+
386+
{"file": "synthetics.adb", "line": 155, "column": 24},
387+
// reference of synthetic `"/="` subprogram of `Derived_Tagged_Default`
388+
{"file": "synthetics_package.adb", "line": 156, "column": 24},
389+
// reference of synthetic `"/="` subprogram of `Derived_Tagged_Default`
390+
391+
{"file": "synthetics.adb", "line": 165, "column": 15},
392+
// reference of synthetic `"="` subprogram of `Derived_Tagged_Default_Private`
393+
{"file": "synthetics_package.adb", "line": 166, "column": 15},
394+
// reference of synthetic `"="` subprogram of `Derived_Tagged_Default_Private`
395+
396+
{"file": "synthetics.adb", "line": 165, "column": 24},
397+
// reference of synthetic `"/="` subprogram of `Derived_Tagged_Default_Private`
398+
{"file": "synthetics_package.adb", "line": 166, "column": 24},
399+
// reference of synthetic `"/="` subprogram of `Derived_Tagged_Default_Private`
400+
401+
{"file": "synthetics.adb", "line": 175, "column": 15},
402+
// reference of synthetic `"="` subprogram of `Derived_Tagged_Default_Public`
403+
{"file": "synthetics_package.adb", "line": 176, "column": 15},
404+
// reference of synthetic `"="` subprogram of `Derived_Tagged_Default_Public`
405+
406+
{"file": "synthetics.adb", "line": 175, "column": 24},
407+
// reference of synthetic `"/="` subprogram of `Derived_Tagged_Default_Public`
408+
{"file": "synthetics_package.adb", "line": 176, "column": 24},
409+
// reference of synthetic `"/="` subprogram of `Derived_Tagged_Default_Public`
410+
411+
{"file": "synthetics.adb", "line": 185, "column": 15},
412+
// reference of synthetic `"="` subprogram of `Tagged_Public`
413+
{"file": "synthetics_package.adb", "line": 186, "column": 15},
414+
// reference of synthetic `"="` subprogram of `Tagged_Public`
415+
416+
{"file": "synthetics.adb", "line": 185, "column": 24},
417+
// reference of synthetic `"/="` subprogram of `Tagged_Public`
418+
{"file": "synthetics_package.adb", "line": 186, "column": 24},
419+
// reference of synthetic `"/="` subprogram of `Tagged_Public`
420+
421+
{"file": "synthetics.adb", "line": 195, "column": 15},
422+
// reference of synthetic `"="` subprogram of `Derived_Tagged_Public`
423+
{"file": "synthetics_package.adb", "line": 196, "column": 15},
424+
// reference of synthetic `"="` subprogram of `Derived_Tagged_Public`
425+
426+
{"file": "synthetics.adb", "line": 195, "column": 24},
427+
// reference of synthetic `"/="` subprogram of `Derived_Tagged_Public`
428+
{"file": "synthetics_package.adb", "line": 196, "column": 24},
429+
// reference of synthetic `"/="` subprogram of `Derived_Tagged_Public`
430+
431+
{"file": "synthetics.adb", "line": 205, "column": 15},
432+
// reference of synthetic `"="` subprogram of `Derived_Tagged_Public_Public`
433+
{"file": "synthetics_package.adb", "line": 206, "column": 15},
434+
// reference of synthetic `"="` subprogram of `Derived_Tagged_Public_Public`
435+
436+
{"file": "synthetics.adb", "line": 205, "column": 24},
437+
// reference of synthetic `"/="` subprogram of `Derived_Tagged_Public_Public`
438+
{"file": "synthetics_package.adb", "line": 206, "column": 24},
439+
// reference of synthetic `"/="` subprogram of `Derived_Tagged_Public_Public`
440+
441+
{"file": "synthetics.adb", "line": 215, "column": 15},
442+
// reference of synthetic `"="` subprogram of `Derived_Tagged_Public_Private`
443+
{"file": "synthetics_package.adb", "line": 216, "column": 15},
444+
// reference of synthetic `"="` subprogram of `Derived_Tagged_Public_Private`
445+
446+
{"file": "synthetics.adb", "line": 215, "column": 24},
447+
// reference of synthetic `"/="` subprogram of `Derived_Tagged_Public_Private`
448+
{"file": "synthetics_package.adb", "line": 216, "column": 24},
449+
// reference of synthetic `"/="` subprogram of `Derived_Tagged_Public_Private`
450+
451+
452+
{"file": "synthetics.adb", "line": 225, "column": 15},
453+
// reference of synthetic `"="` subprogram of `Tagged_Private`
454+
{"file": "synthetics_package.adb", "line": 226, "column": 15},
455+
// reference of synthetic `"="` subprogram of `Tagged_Private`
456+
457+
{"file": "synthetics.adb", "line": 225, "column": 24},
458+
// reference of synthetic `"/="` subprogram of `Tagged_Private`
459+
{"file": "synthetics_package.adb", "line": 226, "column": 24},
460+
// reference of synthetic `"/="` subprogram of `Tagged_Private`
461+
462+
{"file": "synthetics.adb", "line": 235, "column": 15},
463+
// reference of synthetic `"="` subprogram of `Derived_Tagged_Private`
464+
{"file": "synthetics_package.adb", "line": 236, "column": 15},
465+
// reference of synthetic `"="` subprogram of `Derived_Tagged_Private`
466+
467+
{"file": "synthetics.adb", "line": 235, "column": 24},
468+
// reference of synthetic `"/="` subprogram of `Derived_Tagged_Private`
469+
{"file": "synthetics_package.adb", "line": 236, "column": 24},
470+
// reference of synthetic `"/="` subprogram of `Derived_Tagged_Private`
471+
472+
{"file": "synthetics.adb", "line": 245, "column": 15},
473+
// reference of synthetic `"="` subprogram of `Derived_Tagged_Private_Public`
474+
{"file": "synthetics_package.adb", "line": 246, "column": 15},
475+
// reference of synthetic `"="` subprogram of `Derived_Tagged_Private_Public`
476+
477+
{"file": "synthetics.adb", "line": 245, "column": 24},
478+
// reference of synthetic `"/="` subprogram of `Derived_Tagged_Private_Public`
479+
{"file": "synthetics_package.adb", "line": 246, "column": 24},
480+
// reference of synthetic `"/="` subprogram of `Derived_Tagged_Private_Public`
481+
482+
{"file": "synthetics.adb", "line": 255, "column": 15},
483+
// reference of synthetic `"="` subprogram of `Derived_Tagged_Private_Private`
484+
{"file": "synthetics_package.adb", "line": 256, "column": 15},
485+
// reference of synthetic `"="` subprogram of `Derived_Tagged_Private_Private`
486+
487+
{"file": "synthetics.adb", "line": 255, "column": 24},
488+
// reference of synthetic `"/="` subprogram of `Derived_Tagged_Private_Private`
489+
{"file": "synthetics_package.adb", "line": 256, "column": 24},
490+
// reference of synthetic `"/="` subprogram of `Derived_Tagged_Private_Private`
491+
360492
// {"file": "pkg1.ads", "line": 5, "column": 9}, // package specification name
361493
// {"file": "pkg1.ads", "line": 9, "column": 5}, // package specification end name
362494
// {"file": "pkg1.adb", "line": 5, "column": 14}, // package body name

testsuite/als_helper/synthetics.adb

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,126 @@ package body Synthetics is
136136
begin
137137
null;
138138
end;
139+
140+
declare
141+
A : Tagged_Default;
142+
B : Tagged_Default;
143+
144+
begin
145+
if A = B or B /= A then
146+
null;
147+
end if;
148+
end;
149+
150+
declare
151+
A : Derived_Tagged_Default;
152+
B : Derived_Tagged_Default;
153+
154+
begin
155+
if A = B or B /= A then
156+
null;
157+
end if;
158+
end;
159+
160+
declare
161+
A : Derived_Tagged_Default_Private;
162+
B : Derived_Tagged_Default_Private;
163+
164+
begin
165+
if A = B or B /= A then
166+
null;
167+
end if;
168+
end;
169+
170+
declare
171+
A : Derived_Tagged_Default_Public;
172+
B : Derived_Tagged_Default_Public;
173+
174+
begin
175+
if A = B or B /= A then
176+
null;
177+
end if;
178+
end;
179+
180+
declare
181+
A : Tagged_Public;
182+
B : Tagged_Public;
183+
184+
begin
185+
if A = B or B /= A then
186+
null;
187+
end if;
188+
end;
189+
190+
declare
191+
A : Derived_Tagged_Public;
192+
B : Derived_Tagged_Public;
193+
194+
begin
195+
if A = B or B /= A then
196+
null;
197+
end if;
198+
end;
199+
200+
declare
201+
A : Derived_Tagged_Public_Public;
202+
B : Derived_Tagged_Public_Public;
203+
204+
begin
205+
if A = B or B /= A then
206+
null;
207+
end if;
208+
end;
209+
210+
declare
211+
A : Derived_Tagged_Public_Private;
212+
B : Derived_Tagged_Public_Private;
213+
214+
begin
215+
if A = B or B /= A then
216+
null;
217+
end if;
218+
end;
219+
220+
declare
221+
A : Tagged_Private;
222+
B : Tagged_Private;
223+
224+
begin
225+
if A = B or B /= A then
226+
null;
227+
end if;
228+
end;
229+
230+
declare
231+
A : Derived_Tagged_Private;
232+
B : Derived_Tagged_Private;
233+
234+
begin
235+
if A = B or B /= A then
236+
null;
237+
end if;
238+
end;
239+
240+
declare
241+
A : Derived_Tagged_Private_Private;
242+
B : Derived_Tagged_Private_Private;
243+
244+
begin
245+
if A = B or B /= A then
246+
null;
247+
end if;
248+
end;
249+
250+
declare
251+
A : Derived_Tagged_Private_Public;
252+
B : Derived_Tagged_Private_Public;
253+
254+
begin
255+
if A = B or B /= A then
256+
null;
257+
end if;
258+
end;
139259
end Dummy;
140260

141261
end Synthetics;

0 commit comments

Comments
 (0)