]> granicus.if.org Git - clang/commitdiff
Fix a bug which creduce found reducing PR12585.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 20 Apr 2012 05:42:36 +0000 (05:42 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 20 Apr 2012 05:42:36 +0000 (05:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155185 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaTemplate.cpp
test/SemaTemplate/class-template-decl.cpp

index ff8c4dacc246cad1ac9815675eb3962a004e397f..a0b996beecd3c81586eb1ae6b55ebf44d52ee8e6 100644 (file)
@@ -938,7 +938,7 @@ Sema::CheckClassTemplate(Scope *S, unsigned TagSpec, TagUseKind TUK,
       while (!OutermostContext->isFileContext())
         OutermostContext = OutermostContext->getLookupParent();
 
-      if (PrevDecl &&
+      if (PrevClassTemplate &&
           (OutermostContext->Equals(PrevDecl->getDeclContext()) ||
            OutermostContext->Encloses(PrevDecl->getDeclContext()))) {
         SemanticContext = PrevDecl->getDeclContext();
index ec4e0163855c3a1f6845cd5dff49deeeb2dfd275..4d69ac4f7136632ba40291ff4acf9d6ecfaed76b 100644 (file)
@@ -95,3 +95,12 @@ namespace rdar9676205 {
   };
 }
 
+namespace Redecl {
+  struct S {
+    int packaged_task;
+    template<typename> class future {
+      template<typename> friend class packaged_task;
+    };
+    future<void> share;
+  };
+}