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>

llvm-svn: 109296
This commit is contained in:
Douglas Gregor 2010-07-24 00:10:38 +00:00
parent 306a1f9721
commit 536f091f95
1 changed files with 1 additions and 1 deletions

View File

@ -2245,7 +2245,7 @@ Sema::HandleDeclarator(Scope *S, Declarator &D,
// 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);