150
|
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
|
|
7
|
|
8 #ifndef HEADER
|
|
9 #define HEADER
|
|
10
|
|
11 template<typename ...T> struct A : T... {
|
|
12 using T::f ...;
|
|
13 template<typename ...U> void g(U ...u) { f(u...); }
|
|
14 };
|
|
15
|
|
16 struct X { void f(); };
|
|
17 struct Y { void f(int); };
|
|
18 struct Z { void f(int, int); };
|
|
19
|
|
20 inline A<X, Y, Z> a;
|
|
21
|
|
22 #else
|
|
23
|
|
24 void test() {
|
|
25 a.g();
|
|
26 a.g(0);
|
|
27 a.g(0, 0);
|
|
28 // expected-error@13 {{no match}}
|
|
29 // expected-note@16 {{candidate}}
|
|
30 // expected-note@17 {{candidate}}
|
|
31 // expected-note@18 {{candidate}}
|
|
32 a.g(0, 0, 0); // expected-note {{instantiation of}}
|
|
33 }
|
|
34
|
|
35 #endif
|