This is an archive of the discontinued LLVM Phabricator instance.

[clang][ExtractAPI] Refactor C++ method and field visitation
ClosedPublic

Authored by evelez7 on Aug 15 2023, 3:53 PM.

Details

Summary

Refactor visitation for C++ record children by following the Visitor's CRTP.
Expand VisitCXXField, VisitCXXMethod for non-templates and introduce VisitCXXConstructor, VisitCXXDestructor.
Handle relationships by finding the parent's Record via USR from DeclContext.

Depends on D158029

Diff Detail

Event Timeline

evelez7 created this revision.Aug 15 2023, 3:53 PM
Herald added a project: Restricted Project. · View Herald Transcript
evelez7 requested review of this revision.Aug 15 2023, 3:53 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 15 2023, 3:53 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
evelez7 updated this revision to Diff 551212.Aug 17 2023, 11:39 AM

Fix passing Decl's template, introduced from parent updates

dang accepted this revision.Aug 21 2023, 5:34 AM

Did this change not affect ordering of the symbols in the generated JSON? Looks pretty good to me otherwise!

This revision is now accepted and ready to land.Aug 21 2023, 5:34 AM
This revision was landed with ongoing or failed builds.Aug 21 2023, 10:38 AM
This revision was automatically updated to reflect the committed changes.

Did this change not affect ordering of the symbols in the generated JSON? Looks pretty good to me otherwise!

It only changed method ordering due to them not being grouped together, so instance methods always appear before static methods now.