[cfe-commits] r144094 - in /cfe/trunk/lib/AST: Decl.cpp DeclBase.cpp
Axel Naumann
Axel.Naumann at cern.ch
Tue Nov 8 10:21:06 PST 2011
Author: axel
Date: Tue Nov 8 12:21:06 2011
New Revision: 144094
URL: http://llvm.org/viewvc/llvm-project?rev=144094&view=rev
Log:
>From Vassil Vassilev: add checks for removing Decls for more use cases.
Modified:
cfe/trunk/lib/AST/Decl.cpp
cfe/trunk/lib/AST/DeclBase.cpp
Modified: cfe/trunk/lib/AST/Decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=144094&r1=144093&r2=144094&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Decl.cpp (original)
+++ cfe/trunk/lib/AST/Decl.cpp Tue Nov 8 12:21:06 2011
@@ -1622,7 +1622,7 @@
FunTmpl->setPreviousDeclaration(PrevFunTmpl);
}
- if (PrevDecl->IsInline)
+ if (PrevDecl && PrevDecl->IsInline)
IsInline = true;
}
Modified: cfe/trunk/lib/AST/DeclBase.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclBase.cpp?rev=144094&r1=144093&r2=144094&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclBase.cpp (original)
+++ cfe/trunk/lib/AST/DeclBase.cpp Tue Nov 8 12:21:06 2011
@@ -987,7 +987,8 @@
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);
}
}
More information about the cfe-commits
mailing list