[cfe-commits] r80399 - /cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp

Douglas Gregor dgregor at apple.com
Fri Aug 28 15:06:43 PDT 2009


Author: dgregor
Date: Fri Aug 28 17:06:43 2009
New Revision: 80399

URL: http://llvm.org/viewvc/llvm-project?rev=80399&view=rev
Log:
Remove #if 0'd code that is clearly not needed

Modified:
    cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp

Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp?rev=80399&r1=80398&r2=80399&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp Fri Aug 28 17:06:43 2009
@@ -1069,32 +1069,8 @@
   DeclContext *PreviousContext = CurContext;
   CurContext = Var->getDeclContext();
   
-#if 0
-  // Instantiate the initializer of this static data member.
-  OwningExprResult Init 
-    = InstantiateExpr(Def->getInit(), getTemplateInstantiationArgs(Var));
-  if (Init.isInvalid()) {
-    // If instantiation of the initializer failed, mark the declaration invalid
-    // and don't instantiate anything else that was triggered by this 
-    // instantiation.
-    Var->setInvalidDecl();
-
-    // Restore the set of pending implicit instantiations.
-    PendingImplicitInstantiations.swap(SavedPendingImplicitInstantiations);
-    
-    return;
-  } 
-  
-  // Type-check the initializer.
-  if (Init.get())
-    AddInitializerToDecl(DeclPtrTy::make(Var), move(Init),
-                         Def->hasCXXDirectInitializer());
-  else 
-    ActOnUninitializedDecl(DeclPtrTy::make(Var), false);
-#else
   Var = cast_or_null<VarDecl>(SubstDecl(Def, Var->getDeclContext(),
                                           getTemplateInstantiationArgs(Var)));
-#endif
   
   CurContext = PreviousContext;
 





More information about the cfe-commits mailing list