]> granicus.if.org Git - clang/commitdiff
Remove #if 0'd code that is clearly not needed
authorDouglas Gregor <dgregor@apple.com>
Fri, 28 Aug 2009 22:06:43 +0000 (22:06 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 28 Aug 2009 22:06:43 +0000 (22:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80399 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaTemplateInstantiateDecl.cpp

index 7b06bf909aa731d9b0929117ba5d44a6a3cde6ba..8370bd17efad77d7fd83ffc0480329955ce1f882 100644 (file)
@@ -1069,32 +1069,8 @@ void Sema::InstantiateStaticDataMemberDefinition(
   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;