39 lines · cpp
1// No PCH:2// RUN: %clang_cc1 -pedantic -std=c++1z -include %s -verify %s3//4// With PCH:5// RUN: %clang_cc1 -pedantic -std=c++1z -emit-pch %s -o %t6// RUN: %clang_cc1 -pedantic -std=c++1z -include-pch %t -verify %s7 8// RUN: %clang_cc1 -pedantic -std=c++1z -emit-pch -fpch-instantiate-templates %s -o %t9// RUN: %clang_cc1 -pedantic -std=c++1z -include-pch %t -verify %s10 11#ifndef HEADER12#define HEADER13 14template<typename ...T> struct A : T... {15 using T::f ...;16 template<typename ...U> void g(U ...u) { f(u...); }17};18 19struct X { void f(); };20struct Y { void f(int); };21struct Z { void f(int, int); };22 23inline A<X, Y, Z> a;24 25#else26 27void 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#endif39