This is an archive of the discontinued LLVM Phabricator instance.

[clang][extract-api] Add struct support
ClosedPublic

Authored by zixuw on Mar 21 2022, 7:13 PM.

Details

Summary
  • Add StructFieldRecord and StructRecord to store API information for structs
  • Implement VisitRecordDecl in ExtractAPIVisitor
  • Implement Symbol Graph serialization for struct records.
  • Add test case for struct records.

Depends on D121873

Diff Detail

Event Timeline

zixuw created this revision.Mar 21 2022, 7:13 PM
Herald added a project: Restricted Project. · View Herald Transcript
zixuw requested review of this revision.Mar 21 2022, 7:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 21 2022, 7:13 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
dang added inline comments.Mar 22 2022, 9:58 AM
clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
371

"property" instead of "struct.field"

372

"Instance Property"

376

"Structure"

dang accepted this revision.Mar 22 2022, 11:09 AM
This revision is now accepted and ready to land.Mar 22 2022, 11:09 AM
dang requested changes to this revision.Mar 22 2022, 11:09 AM
This revision now requires changes to proceed.Mar 22 2022, 11:09 AM
zixuw updated this revision to Diff 417438.Mar 22 2022, 4:53 PM
zixuw marked 3 inline comments as done.

Address review issues: fix Symbol Graph struct kind identifiers and display names

dang accepted this revision.Mar 23 2022, 9:43 AM

LGTM!

This revision is now accepted and ready to land.Mar 23 2022, 9:43 AM
This revision was automatically updated to reflect the committed changes.