Skip to content

Commit b6da16f

Browse files
[clang][ExtractAPI] Ignore fully anonymous RecordDecls
ExtractAPI was emitting a separate symbol for anonymous record declaration that define the type of a member of another record declaration. Now ExtractAPI ignores these declarations and just records the existence of the actual member. Differential Revision: https://reviews.llvm.org/D135804
1 parent 7055751 commit b6da16f

File tree

2 files changed

+399
-0
lines changed

2 files changed

+399
-0
lines changed

clang/lib/ExtractAPI/ExtractAPIConsumer.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,9 @@ class ExtractAPIVisitor : public RecursiveASTVisitor<ExtractAPIVisitor> {
401401
StringRef Name = Decl->getName();
402402
if (Name.empty())
403403
Name = getTypedefName(Decl);
404+
if (Name.empty())
405+
return true;
406+
404407
StringRef USR = API.recordUSR(Decl);
405408
PresumedLoc Loc =
406409
Context.getSourceManager().getPresumedLoc(Decl->getLocation());

0 commit comments

Comments
 (0)