Replace a FIXME with a diagnostic when we can't resolve the

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
This commit is contained in:
Douglas Gregor 2012-03-18 00:15:42 +00:00
parent 42aceadbc3
commit 957ff27311
2 changed files with 11 additions and 1 deletions

View 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;
}

View 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}}
};
}