From f178dcab504ac47901dc99ff51b0d0fe07dddbe1 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Sat, 24 Jul 2010 00:10:38 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109296 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaDecl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index cf5f98e068..7360805f60 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -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); -- 2.50.1