diff options
author | Daniel Grumberg <dgrumberg@apple.com> | 2022-10-12 18:18:15 +0100 |
---|---|---|
committer | Daniel Grumberg <dgrumberg@apple.com> | 2022-10-13 11:53:53 +0100 |
commit | b6da16ffb9d5a47c16fa377097809c6592132d34 (patch) | |
tree | 014463a64f81b9800d8519666855b1fed3b020e0 /clang/lib/ExtractAPI/ExtractAPIConsumer.cpp | |
parent | 7055751115eb1002e25ab03093d0aecae856120f (diff) | |
download | llvm-b6da16ffb9d5a47c16fa377097809c6592132d34.zip llvm-b6da16ffb9d5a47c16fa377097809c6592132d34.tar.gz llvm-b6da16ffb9d5a47c16fa377097809c6592132d34.tar.bz2 |
[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
Diffstat (limited to 'clang/lib/ExtractAPI/ExtractAPIConsumer.cpp')
-rw-r--r-- | clang/lib/ExtractAPI/ExtractAPIConsumer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/ExtractAPI/ExtractAPIConsumer.cpp b/clang/lib/ExtractAPI/ExtractAPIConsumer.cpp index 4a97ee9..2333f81 100644 --- a/clang/lib/ExtractAPI/ExtractAPIConsumer.cpp +++ b/clang/lib/ExtractAPI/ExtractAPIConsumer.cpp @@ -401,6 +401,9 @@ public: StringRef Name = Decl->getName(); if (Name.empty()) Name = getTypedefName(Decl); + if (Name.empty()) + return true; + StringRef USR = API.recordUSR(Decl); PresumedLoc Loc = Context.getSourceManager().getPresumedLoc(Decl->getLocation()); |