aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
diff options
context:
space:
mode:
authorDaniel Grumberg <dgrumberg@apple.com>2024-08-19 15:57:43 +0100
committerGitHub <noreply@github.com>2024-08-19 15:57:43 +0100
commitc60da1a271a6bb271e7703b2f7c71fbece67ab78 (patch)
tree637ab67943c49e390c0d3177443946e01754dcb4 /clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
parent79f6ae05c139d3d5b6446f8a265a3c6e3f5b18f8 (diff)
downloadllvm-c60da1a271a6bb271e7703b2f7c71fbece67ab78.zip
llvm-c60da1a271a6bb271e7703b2f7c71fbece67ab78.tar.gz
llvm-c60da1a271a6bb271e7703b2f7c71fbece67ab78.tar.bz2
[clang][ExtractAPI] Stop dropping fields of nested anonymous record types when they aren't attached to variable declaration (#104600)
- Introduce primitives for removing records from `APISet` and managing the record chain of `RecordContext` - Detect nested anonymous record types and remove them from the `APISet` after they have been fully traversed and transfer ownership of child records to the parent context (if any)
Diffstat (limited to 'clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp')
-rw-r--r--clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp b/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
index 1f8029c..1bce9c5 100644
--- a/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
+++ b/clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp
@@ -673,14 +673,6 @@ bool SymbolGraphSerializer::shouldSkip(const APIRecord *Record) const {
if (Record->Availability.isUnconditionallyUnavailable())
return true;
- // Filter out symbols without a name as we can generate correct symbol graphs
- // for them. In practice these are anonymous record types that aren't attached
- // to a declaration.
- if (auto *Tag = dyn_cast<TagRecord>(Record)) {
- if (Tag->IsEmbeddedInVarDeclarator)
- return true;
- }
-
// Filter out symbols prefixed with an underscored as they are understood to
// be symbols clients should not use.
if (Record->Name.starts_with("_"))