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);


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to