summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Naumann <Axel.Naumann@cern.ch>2011-08-26 14:06:12 +0000
committerAxel Naumann <Axel.Naumann@cern.ch>2011-08-26 14:06:12 +0000
commitcb2c52f7acccf78a47f3930be282d572f94a2fa9 (patch)
tree21c41752757091c632147698fca9ef096e569f27
parentdb6f646ec300fa631c62695a8d5e7acbbce38878 (diff)
downloadbcm5719-llvm-cb2c52f7acccf78a47f3930be282d572f94a2fa9.tar.gz
bcm5719-llvm-cb2c52f7acccf78a47f3930be282d572f94a2fa9.zip
From Vassil Vassilev: unnamed decls cannot be removed from the lookup map.
llvm-svn: 138631
-rw-r--r--clang/lib/AST/DeclBase.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp
index 43a1c24149f..8b1acb19964 100644
--- a/clang/lib/AST/DeclBase.cpp
+++ b/clang/lib/AST/DeclBase.cpp
@@ -969,6 +969,9 @@ void DeclContext::removeDecl(Decl *D) {
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;
OpenPOWER on IntegriCloud