Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / PCH / cxx1z-using-declaration.cpp
blobdd0e59f516f6c7d7fa4f67eb6dc5e0bd9ac1677d
1 // No PCH:
2 // RUN: %clang_cc1 -pedantic -std=c++1z -include %s -verify %s
3 //
4 // With PCH:
5 // RUN: %clang_cc1 -pedantic -std=c++1z -emit-pch %s -o %t
6 // RUN: %clang_cc1 -pedantic -std=c++1z -include-pch %t -verify %s
8 // RUN: %clang_cc1 -pedantic -std=c++1z -emit-pch -fpch-instantiate-templates %s -o %t
9 // RUN: %clang_cc1 -pedantic -std=c++1z -include-pch %t -verify %s
11 #ifndef HEADER
12 #define HEADER
14 template<typename ...T> struct A : T... {
15 using T::f ...;
16 template<typename ...U> void g(U ...u) { f(u...); }
19 struct X { void f(); };
20 struct Y { void f(int); };
21 struct Z { void f(int, int); };
23 inline A<X, Y, Z> a;
25 #else
27 void test() {
28 a.g();
29 a.g(0);
30 a.g(0, 0);
31 // expected-error@16 {{no match}}
32 // expected-note@19 {{candidate}}
33 // expected-note@20 {{candidate}}
34 // expected-note@21 {{candidate}}
35 a.g(0, 0, 0); // expected-note {{instantiation of}}
38 #endif