Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaTemplate / dependent-typos-recovery.cpp
blob3f89ca1dbec954684f1d30bb2898dd4d2377595f
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 // There should be no extra errors about missing 'template' keywords.
4 struct B {
5 template <typename T>
6 int f(){};
7 } builder; // expected-note 2{{'builder' declared here}}
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}}
12 struct X {
13 struct type {};
16 namespace PR48339 {
17 struct S {
18 template <typename T> static void g(typename T::type) {} // expected-note {{couldn't infer template argument 'T'}}
19 template <typename T> void f() { g(typename T::type{}); } // expected-error {{no matching function for call to 'g'}}
22 void f() { S{}.f<X>(); } // expected-note {{in instantiation of}}