diff options
author | Axel Naumann <Axel.Naumann@cern.ch> | 2011-08-26 14:06:12 +0000 |
---|---|---|
committer | Axel Naumann <Axel.Naumann@cern.ch> | 2011-08-26 14:06:12 +0000 |
commit | 02368d0d1a778b73fd73600496fcde4557b2973f (patch) | |
tree | d1171d0277196a38314e3b6256866d329cedc38a /lib/AST/DeclBase.cpp | |
parent | fd71fb81c5f9382caf0131946e890b133e12ceb5 (diff) |
From Vassil Vassilev: unnamed decls cannot be removed from the lookup map.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138631 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r-- | lib/AST/DeclBase.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index 43a1c24149..8b1acb1996 100644 --- a/lib/AST/DeclBase.cpp +++ b/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; |