[PATCH] D123019: [WIP][clang][extract-api] Add support for typedefs
Daniel Grumberg via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 4 03:54:03 PDT 2022
dang created this revision.
dang added reviewers: zixuw, ributzka, QuietMisdreavus.
Herald added a subscriber: mgorny.
Herald added a project: All.
dang requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Typedef records consist of the symbol associated with the underlying
TypedefDecl and a SymbolReference to the underlying type. Additionally
typedefs for anonymous TagTypes use the typedef'd name as the symbol
name in their respective records and USRs. As a result the declaration
fragments for the anonymous TagType are those for the associated
typedef. This means that when the user is defining a typedef to a
typedef to a anonymous type, we use a reference the anonymous TagType
itself and do not emit the typedef to the anonymous type in the
generated symbol graph, including in the type destination of further
typedef symbol records.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D123019
Files:
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/CMakeLists.txt
clang/lib/ExtractAPI/DeclarationFragments.cpp
clang/lib/ExtractAPI/ExtractAPIConsumer.cpp
clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
clang/lib/ExtractAPI/TypedefUnderlyingTypeResolver.cpp
clang/lib/ExtractAPI/TypedefUnderlyingTypeResolver.h
clang/test/ExtractAPI/typedef.c
clang/test/ExtractAPI/typedef_anonymous_record.c
clang/test/ExtractAPI/typedef_chain.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123019.420133.patch
Type: text/x-patch
Size: 30301 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220404/d940c2d7/attachment-0001.bin>
More information about the cfe-commits
mailing list