diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-07-24 00:10:38 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-07-24 00:10:38 +0000 |
commit | f178dcab504ac47901dc99ff51b0d0fe07dddbe1 (patch) | |
tree | 297dc5990ebc51bd75496c1b76aba56fbcae19a2 /lib/Sema/SemaDecl.cpp | |
parent | 175c4a9aa61f4449f27b729737e4438684ac6d92 (diff) |
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>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109296 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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); |