]> granicus.if.org Git - clang/commitdiff
Move a declaration closer to its use. No functionality change.
authorNico Weber <nicolasweber@gmx.de>
Sun, 23 Dec 2012 00:40:46 +0000 (00:40 +0000)
committerNico Weber <nicolasweber@gmx.de>
Sun, 23 Dec 2012 00:40:46 +0000 (00:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170992 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDecl.cpp

index 2bf0387d8472fca8cc45524535f46d52744ac566..105ef49bd8773dede202887c86d29fccf6bcc498 100644 (file)
@@ -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()) {