rsmith added inline comments.
================ Comment at: test/SemaCXX/unknown-type-name.cpp:50 template<typename T> -void f(T::type) { } // expected-error{{missing 'typename'}} +void f(T::type) { } // expected-warning {{implicit 'typename' is a C++2a extension}} ---------------- Rakete1111 wrote: > rsmith wrote: > > This is wrong. > > > > ``` > > template<typename T> > > X f(T::type); > > ``` > > > > declares a variable template. This would be valid if the name `f` were a > > //qualified-id//, and lookup for `f` found a function template, though. > > > > (Same for the next 7 cases.) > I agree, but those are definitions, so the next 7 cases and this now are > correct. I think you've misunderstood the rule. The rule that I think you're referring to is: "A qualified-id is assumed to name a type if it is a decl-specifier of the decl-specifier-seq of a simple-declaration or a function-definition in namespace scope" But the decl-specifier-seq is just the type *before* the function name, not the parameter's types. There is no special case for function definitions. Repository: rC Clang https://reviews.llvm.org/D53847 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits