]> granicus.if.org Git - clang/commitdiff
Replace a FIXME with a diagnostic when we can't resolve the
authorDouglas Gregor <dgregor@apple.com>
Sun, 18 Mar 2012 00:15:42 +0000 (00:15 +0000)
committerDouglas Gregor <dgregor@apple.com>
Sun, 18 Mar 2012 00:15:42 +0000 (00:15 +0000)
nested-name-specifier for a class template declaration. Fixes PR12291.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153006 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaTemplate.cpp
test/SemaTemplate/qualified-id.cpp

index afa6c0e15b8307c90893a439682fa1b8c8418821..680e6eaf2e50e17cc067d1e963e7ea75bc1bbdab 100644 (file)
@@ -872,7 +872,8 @@ Sema::CheckClassTemplate(Scope *S, unsigned TagSpec, TagUseKind TUK,
   if (SS.isNotEmpty() && !SS.isInvalid()) {
     SemanticContext = computeDeclContext(SS, true);
     if (!SemanticContext) {
-      // FIXME: Produce a reasonable diagnostic here
+      Diag(NameLoc, diag::err_template_qualified_declarator_no_match)
+        << SS.getScopeRep() << SS.getRange();
       return true;
     }
 
index 29eab89d84f557b83ee79ad7daf0f7fd719ea7b5..64dff1ce235359acf868c962fbcf592bf4fb5476 100644 (file)
@@ -45,3 +45,12 @@ namespace PR6063 {
     detail::f(a, b);
   }
 }
+
+namespace PR12291 {
+  template <typename T>
+  class Outer2 {
+    template <typename V>
+    template <typename W>
+    class Outer2<V>::Inner; // expected-error{{nested name specifier 'Outer2<V>::' for declaration does not refer into a class, class template or class template partial specialization}}
+  };
+}