[clang][extract-api] Add struct support
commit5bb5704c1b35023b8a6217a6eb7d98a47efe1ca2
authorZixu Wang <zixu_wang@apple.com>
Tue, 22 Mar 2022 02:11:29 +0000 (21 19:11 -0700)
committerZixu Wang <zixu_wang@apple.com>
Wed, 23 Mar 2022 16:45:06 +0000 (23 09:45 -0700)
treedfdf6f8149f31b13fc83902a211b55cbd5ca8119
parent311bdbc9b73f7aadc37be4285c74576600b9bdba
[clang][extract-api] Add struct support

- 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

Differential Revision: https://reviews.llvm.org/D122202
clang/include/clang/ExtractAPI/API.h
clang/include/clang/ExtractAPI/DeclarationFragments.h
clang/include/clang/ExtractAPI/Serialization/SymbolGraphSerializer.h
clang/lib/ExtractAPI/API.cpp
clang/lib/ExtractAPI/DeclarationFragments.cpp
clang/lib/ExtractAPI/ExtractAPIConsumer.cpp
clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
clang/test/ExtractAPI/struct.c [new file with mode: 0644]