Skip to content

Commit 854eb7d

Browse files
committed
Test: Do not process synthetic nodes
These represent implicit subprograms, such as the inequality operator, so skip them as they are tested by the concrete equality opertator's tests.
1 parent 139f784 commit 854eb7d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/test-skeleton.adb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1838,11 +1838,21 @@ package body Test.Skeleton is
18381838

18391839
ISub := ISub_Iter;
18401840

1841+
-- Do not process a subprogram which:
1842+
-- - Is abstract or null
1843+
-- - Is overriden
1844+
-- - Is synthetic, such as the inequality operator
1845+
18411846
if
18421847
Source_Present (ISub.Unit.Get_Filename)
18431848
and then Is_Callable_Subprogram (ISub)
18441849
and then not Is_Private (ISub)
18451850
and then not Is_Overridden (ISub, ISubs2)
1851+
and then not (ISub.Kind in Ada_Synthetic_Subp_Decl)
1852+
and then not (ISub.P_Subp_Spec_Or_Null.Is_Null)
1853+
and then not
1854+
(ISub.P_Subp_Spec_Or_Null.Kind
1855+
in Ada_Synthetic_Binary_Spec)
18461856
then
18471857

18481858
-- We need to go to original declaration of the inherited
@@ -7827,6 +7837,12 @@ package body Test.Skeleton is
78277837
return Over;
78287838
end if;
78297839

7840+
-- Do not process synthetic decls, no stub are generated for them
7841+
7842+
if Decl.Kind in Ada_Synthetic_Subp_Decl then
7843+
return Over;
7844+
end if;
7845+
78307846
-- Process simple cases for now. Dispatchings, renamings and parts of
78317847
-- instances are not yet supported.
78327848

0 commit comments

Comments
 (0)