Skip to content

Commit

Permalink
Merge branch 'topic/synth_op_skip' into 'master'
Browse files Browse the repository at this point in the history
Test: Do not process synthetic nodes

See merge request eng/ide/libadalang-tools!293
  • Loading branch information
leocreuse committed Jan 7, 2025
2 parents 139f784 + 854eb7d commit f86c8e2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/test-skeleton.adb
Original file line number Diff line number Diff line change
Expand Up @@ -1838,11 +1838,21 @@ package body Test.Skeleton is

ISub := ISub_Iter;

-- Do not process a subprogram which:
-- - Is abstract or null
-- - Is overriden
-- - Is synthetic, such as the inequality operator

if
Source_Present (ISub.Unit.Get_Filename)
and then Is_Callable_Subprogram (ISub)
and then not Is_Private (ISub)
and then not Is_Overridden (ISub, ISubs2)
and then not (ISub.Kind in Ada_Synthetic_Subp_Decl)
and then not (ISub.P_Subp_Spec_Or_Null.Is_Null)
and then not
(ISub.P_Subp_Spec_Or_Null.Kind
in Ada_Synthetic_Binary_Spec)
then

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

-- Do not process synthetic decls, no stub are generated for them

if Decl.Kind in Ada_Synthetic_Subp_Decl then
return Over;
end if;

-- Process simple cases for now. Dispatchings, renamings and parts of
-- instances are not yet supported.

Expand Down

0 comments on commit f86c8e2

Please sign in to comment.