[PATCH] D139115: [clang][ExtractAPI] Add support for single symbol SGF

Daniel Grumberg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 1 07:10:29 PST 2022


dang created this revision.
dang added reviewers: zixuw, ributzka, QuietMisdreavus, bnbarham.
Herald added a subscriber: arphaman.
Herald added a project: All.
dang requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This is mainly adding an entry point to `SymbolGraphSerializer` at
`serializeSingleSymbolSGF` and exposing the necessary data to make this
possible.  Additionaly there are some changes to how symbol kinds and
path components are serialized to make the usage more ergonomic in
`serializeSingleSymbolSGF`.

[clang][ExtractAPI] Add libclang support

Introduces APIs to:

- create an APISet from a TU
- dispose of an APISet
- query an APISet for a single symbol SGF for a given USR.
- generate a single symbol SGF for a given CXCursor, this only traverses

the necessary AST nodes to construct the result as oppposed as going
through the entire AST.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D139115

Files:
  clang/include/clang-c/Documentation.h
  clang/include/clang/ExtractAPI/API.h
  clang/include/clang/ExtractAPI/DeclarationFragments.h
  clang/include/clang/ExtractAPI/ExtractAPIVisitor.h
  clang/include/clang/ExtractAPI/Serialization/SerializerBase.h
  clang/include/clang/ExtractAPI/Serialization/SymbolGraphSerializer.h
  clang/lib/ExtractAPI/API.cpp
  clang/lib/ExtractAPI/CMakeLists.txt
  clang/lib/ExtractAPI/DeclarationFragments.cpp
  clang/lib/ExtractAPI/ExtractAPIConsumer.cpp
  clang/lib/ExtractAPI/ExtractAPIVisitor.cpp
  clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
  clang/lib/ExtractAPI/TypedefUnderlyingTypeResolver.cpp
  clang/lib/ExtractAPI/TypedefUnderlyingTypeResolver.h
  clang/test/Index/extract-api-cursor.m
  clang/test/Index/extract-api-usr.m
  clang/tools/c-index-test/c-index-test.c
  clang/tools/libclang/CMakeLists.txt
  clang/tools/libclang/CXExtractAPI.cpp
  clang/tools/libclang/libclang.map

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139115.479286.patch
Type: text/x-patch
Size: 146713 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221201/d3d44bb1/attachment-0001.bin>


More information about the cfe-commits mailing list