]> granicus.if.org Git - clang/commitdiff
Revert r236063 due to regression with -fdelayed-template-parsing.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 29 Apr 2015 17:48:08 +0000 (17:48 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 29 Apr 2015 17:48:08 +0000 (17:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236134 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaTemplateInstantiateDecl.cpp
test/SemaTemplate/instantiate-local-class.cpp

index 57faa1cbad85ef8a5f23716320e2dd36370252f7..8f2e95a6152ac994cf0a03fc009db96543fec4c5 100644 (file)
@@ -1302,19 +1302,11 @@ Decl *TemplateDeclInstantiator::VisitCXXRecordDecl(CXXRecordDecl *D) {
   // DR1484 clarifies that the members of a local class are instantiated as part
   // of the instantiation of their enclosing entity.
   if (D->isCompleteDefinition() && D->isLocalClass()) {
-    Sema::SavePendingLocalImplicitInstantiationsRAII
-        SavedPendingLocalImplicitInstantiations(SemaRef);
-
     SemaRef.InstantiateClass(D->getLocation(), Record, D, TemplateArgs,
                              TSK_ImplicitInstantiation,
                              /*Complain=*/true);
-
     SemaRef.InstantiateClassMembers(D->getLocation(), Record, TemplateArgs,
                                     TSK_ImplicitInstantiation);
-
-    // This class may have local implicit instantiations that need to be
-    // performed within this scope.
-    SemaRef.PerformPendingInstantiations(/*LocalOnly=*/true);
   }
 
   SemaRef.DiagnoseUnusedNestedTypedefs(Record);
index 668fb6fa65b8393ebbd5b157ff8e8a76fa41a22e..367134a2a5311bc07040b0bf8a022a0f88faf2b1 100644 (file)
@@ -213,16 +213,3 @@ namespace PR23194 {
     return make_seed_pair();
   }
 }
-
-namespace PR20625 {
-template <typename T>
-void f() {
-  struct N {
-    static constexpr int get() { return 42; }
-  };
-  constexpr int n = N::get();
-  static_assert(n == 42, "n == 42");
-}
-
-void g() { f<void>(); }
-}