1 // RUN: %clang_cc1 -fsyntax-only -verify %s 2 3 // There should be no extra errors about missing 'template' keywords. 4 struct B { 5 template <typename T> fB6 int f(){}; 7 } builder; // expected-note 2{{'builder' declared here}} 8 9 auto a = bilder.f<int>(); // expected-error{{undeclared identifier 'bilder'; did you mean}} 10 auto b = (*(&bilder+0)).f<int>(); // expected-error{{undeclared identifier 'bilder'; did you mean}} 11 12 struct X { 13 struct type {}; 14 }; 15 16 namespace PR48339 { 17 struct S { gPR48339::S18 template <typename T> static void g(typename T::type) {} // expected-note {{couldn't infer template argument 'T'}} fPR48339::S19 template <typename T> void f() { g(typename T::type{}); } // expected-error {{no matching function for call to 'g'}} 20 }; 21 f()22 void f() { S{}.f<X>(); } // expected-note {{in instantiation of}} 23 } 24