[PATCH] D146656: [clang][ExtractAPI] Refactor ExtractAPIVisitor to make it more extensible
Daniel Grumberg via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 22 12:17:51 PDT 2023
dang created this revision.
dang added reviewers: zixuw, ributzka, bnbarham.
Herald added subscribers: ChuanqiXu, arphaman.
Herald added a project: All.
dang requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Use CRTP to enable creating statically dispatched subclasses of
ExtractAPIVisitor.
This enables adding extension points and customising the behavior more
easily.
This is used in CXExtractAPI.cpp to create a specialized visitor for
Libclang as well as streamlining the batch implementation in ExtractAPIConsumer.cpp
[clang][ExtractAPI] Improve tests for clang_getSymbolGraphForCursor
Adds a new mode to c-index-test that can fetch a single symbol symbol
graph for a given source location. This way we can be more precise when
writing tests for clang_getSymbolGraphForCursor.
Additionaly this makes it easier to debug the function.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D146656
Files:
clang/include/clang/ExtractAPI/ExtractAPIVisitor.h
clang/include/clang/ExtractAPI/TypedefUnderlyingTypeResolver.h
clang/lib/ExtractAPI/CMakeLists.txt
clang/lib/ExtractAPI/DeclarationFragments.cpp
clang/lib/ExtractAPI/ExtractAPIConsumer.cpp
clang/lib/ExtractAPI/ExtractAPIVisitor.cpp
clang/lib/ExtractAPI/TypedefUnderlyingTypeResolver.cpp
clang/lib/ExtractAPI/TypedefUnderlyingTypeResolver.h
clang/test/Index/extract-api-cursor.m
clang/tools/c-index-test/c-index-test.c
clang/tools/libclang/CXExtractAPI.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146656.507469.patch
Type: text/x-patch
Size: 72064 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230322/5d4080d7/attachment-0001.bin>
More information about the cfe-commits
mailing list