[cfe-commits] r138631 - /cfe/trunk/lib/AST/DeclBase.cpp

Axel Naumann Axel.Naumann at cern.ch
Fri Aug 26 07:06:13 PDT 2011


Author: axel
Date: Fri Aug 26 09:06:12 2011
New Revision: 138631

URL: http://llvm.org/viewvc/llvm-project?rev=138631&view=rev
Log:
>From Vassil Vassilev: unnamed decls cannot be removed from the lookup map.

Modified:
    cfe/trunk/lib/AST/DeclBase.cpp

Modified: cfe/trunk/lib/AST/DeclBase.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclBase.cpp?rev=138631&r1=138630&r2=138631&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclBase.cpp (original)
+++ cfe/trunk/lib/AST/DeclBase.cpp Fri Aug 26 09:06:12 2011
@@ -969,6 +969,9 @@
   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;
 





More information about the cfe-commits mailing list