| 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 |
// 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 |
| 10 |
|
| 11 |
#ifndef HEADER |
| 12 |
#define HEADER |
| 13 |
|
| 14 |
template<typename ...T> struct A : T... { |
| 15 |
using T::f ...; |
| 16 |
template<typename ...U> void g(U ...u) { f(u...); } |
| 17 |
}; |
| 18 |
|
| 19 |
struct X { void f(); }; |
| 20 |
struct Y { void f(int); }; |
| 21 |
struct Z { void f(int, int); }; |
| 22 |
|
| 23 |
inline A<X, Y, Z> a; |
| 24 |
|
| 25 |
#else |
| 26 |
|
| 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}} |
| 36 |
} |
| 37 |
|
| 38 |
#endif |