[cfe-commits] r109296 - /cfe/trunk/lib/Sema/SemaDecl.cpp

Douglas Gregor dgregor at apple.com
Fri Jul 23 17:10:38 PDT 2010


Author: dgregor
Date: Fri Jul 23 19:10:38 2010
New Revision: 109296

URL: http://llvm.org/viewvc/llvm-project?rev=109296&view=rev
Log:
Be careful; even though we had a proper name at the beginning of
Sema::ActOnDeclarator doesn't mean that the Decl we ended up creating
has a useful name. <rdar://problem/8229910>

Modified:
    cfe/trunk/lib/Sema/SemaDecl.cpp

Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=109296&r1=109295&r2=109296&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Fri Jul 23 19:10:38 2010
@@ -2245,7 +2245,7 @@
 
   // If this has an identifier and is not an invalid redeclaration or 
   // function template specialization, add it to the scope stack.
-  if (Name && !(Redeclaration && New->isInvalidDecl()))
+  if (New->getDeclName() && !(Redeclaration && New->isInvalidDecl()))
     PushOnScopeChains(New, S);
 
   return DeclPtrTy::make(New);





More information about the cfe-commits mailing list