[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)
This commit is contained in:
@@ -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("_"))
|
||||
|
||||
Reference in New Issue
Block a user