diff options
author | Axel Naumann <Axel.Naumann@cern.ch> | 2011-11-08 18:21:06 +0000 |
---|---|---|
committer | Axel Naumann <Axel.Naumann@cern.ch> | 2011-11-08 18:21:06 +0000 |
commit | d9d137e6bc54bad6a7aa64b667aea22230e8264b (patch) | |
tree | 3cd91fd62d30742339a7f906fe6a9faff3c0cc35 /lib/AST/DeclBase.cpp | |
parent | c44bc2d32f81d11b4c0e46c932ba42e673b50a49 (diff) |
From Vassil Vassilev: add checks for removing Decls for more use cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144094 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r-- | lib/AST/DeclBase.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index 4c31bbd3d7..d892c56f71 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -987,7 +987,8 @@ void DeclContext::removeDecl(Decl *D) { StoredDeclsMap::iterator Pos = Map->find(ND->getDeclName()); assert(Pos != Map->end() && "no lookup entry for decl"); - Pos->second.remove(ND); + if (Pos->second.getAsVector() || Pos->second.getAsDecl() == ND) + Pos->second.remove(ND); } } |