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.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/ExtractAPI/DeclarationFragments.cpp | ||
---|---|---|
15 | Empty line | |
clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp | ||
598–605 | Consider move the should-drop logic into SymbolGraphSerializer::shouldSkip(const APIRecord &Record) const so that we have a central place to see and manage which symbols get skipped. |
clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp | ||
---|---|---|
598–605 | I need to know about it being a TypedefRecord so I can access the underlying type name, so I would need to attempt to dyn_cast in shouldSkip. Also this logic is specific to typedef records so I would prefer to keep it here. |
clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp | ||
---|---|---|
611 | Curious: where does this come from the format spec? Is this required/correctly populated? | |
clang/lib/ExtractAPI/TypedefUnderlyingTypeResolver.cpp | ||
16 | nit: empty line | |
clang/lib/ExtractAPI/TypedefUnderlyingTypeResolver.h | ||
37 | nit: explicit? |
Empty line