From: Nico Weber Date: Sun, 23 Dec 2012 00:40:46 +0000 (+0000) Subject: Move a declaration closer to its use. No functionality change. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e6bb76cde5488eca94e087e8929f29f3f3debfd3;p=clang Move a declaration closer to its use. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170992 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 2bf0387d84..105ef49bd8 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -3701,8 +3701,6 @@ Decl *Sema::HandleDeclarator(Scope *S, Declarator &D, if (D.getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_typedef) return 0; - NamedDecl *New; - TypeSourceInfo *TInfo = GetTypeForDeclarator(D, S); QualType R = TInfo->getType(); @@ -3787,6 +3785,8 @@ Decl *Sema::HandleDeclarator(Scope *S, Declarator &D, D.getDeclSpec().getStorageClassSpec() != DeclSpec::SCS_typedef) Previous.clear(); + NamedDecl *New; + bool AddToScope = true; if (D.getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_typedef) { if (TemplateParamLists.size()) {