]> granicus.if.org Git - clang/commitdiff
Speculatively revert r295118 to see if it's what's causing the modules selfhost build...
authorRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 15 Feb 2017 03:29:24 +0000 (03:29 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Wed, 15 Feb 2017 03:29:24 +0000 (03:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295146 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/Type.cpp
test/SemaTemplate/explicit-specialization-member.cpp

index 1d064b135e3605e5a7613c2b0ed1b3aa2d2ad52e..8f22a1b197acdb510645ce7f73473634c431a580 100644 (file)
@@ -3023,10 +3023,8 @@ static TagDecl *getInterestingTagDecl(TagDecl *decl) {
     if (I->isCompleteDefinition() || I->isBeingDefined())
       return I;
   }
-  // If there's no definition (not even in progress), return the most recent
-  // declaration. This is important for template specializations, in order to
-  // pick the declaration with the most complete TemplateSpecializationKind.
-  return decl->getMostRecentDecl();
+  // If there's no definition (not even in progress), return what we have.
+  return decl;
 }
 
 TagDecl *TagType::getDecl() const {
index 4300ceb17ec0cf91b3f258d31430634c7112fe7b..f302836c7e4b32553692dfb532c5c0642ad67583 100644 (file)
@@ -57,14 +57,3 @@ template<typename T> struct Helper {
 template<typename T> void Helper<T>::func<2>() {} // expected-error {{cannot specialize a member}} \
                                                   // expected-error {{no function template matches}}
 }
-
-namespace b35070233 {
-  template <typename T> struct Cls {
-    static void f() {}
-  };
-
-  void g(Cls<int>);
-
-  template<> struct Cls<int>; // expected-note {{forward declaration}}
-  template<> void Cls<int>::f(); // expected-error {{incomplete type}}
-}