From Vassil Vassilev: unnamed decls cannot be removed from the lookup map.

llvm-svn: 138631
This commit is contained in:
Axel Naumann 2011-08-26 14:06:12 +00:00
parent db6f646ec3
commit cb2c52f7ac
1 changed files with 3 additions and 0 deletions

View File

@ -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;