// qualified-id denotes a type, forming an
// elaborated-type-specifier (7.1.5.3).
if (!LookupCtx && isDependentScopeSpecifier(SS)) {
- Diag(TemplateIILoc, diag::err_typename_missing_template)
+ Diag(SS.getBeginLoc(), diag::err_typename_missing_template)
<< SS.getScopeRep() << TemplateII->getName();
// Recover as if 'typename' were specified.
// FIXME: This is not quite correct recovery as we don't transform SS
};
};
-template<typename T> A<T>::B<T> f1(); // expected-error {{missing 'typename' prior to dependent type template name 'A<T>::B'}}
+template<typename T> A // expected-error {{missing 'typename' prior to dependent type template name 'A<T>::B'}}
+ <T>::B<T> f1();
template<typename T> A<T>::C<T> f2(); // expected-error {{missing 'typename' prior to dependent type template name 'A<T>::C'}}
// FIXME: Should these cases really be valid? There doesn't appear to be a rule prohibiting them...