commit | cb2c52f7acccf78a47f3930be282d572f94a2fa9 | [log] [tgz] |
---|---|---|
author | Axel Naumann <Axel.Naumann@cern.ch> | Fri Aug 26 14:06:12 2011 +0000 |
committer | Axel Naumann <Axel.Naumann@cern.ch> | Fri Aug 26 14:06:12 2011 +0000 |
tree | 21c41752757091c632147698fca9ef096e569f27 | |
parent | db6f646ec300fa631c62695a8d5e7acbbce38878 [diff] [blame] |
From Vassil Vassilev: unnamed decls cannot be removed from the lookup map. llvm-svn: 138631
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp index 43a1c24..8b1acb1 100644 --- a/clang/lib/AST/DeclBase.cpp +++ b/clang/lib/AST/DeclBase.cpp
@@ -969,6 +969,9 @@ if (isa<NamedDecl>(D)) { NamedDecl *ND = cast<NamedDecl>(D); + // Remove only decls that have a name + if (!ND->getDeclName()) return; + StoredDeclsMap *Map = getPrimaryContext()->LookupPtr; if (!Map) return;