1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
13 X3(const X3
&) = default;
17 X4(const X4
&) = default;
25 void f(X1 x1
, X2 x2
, X3 x3
, X4 x4
) {
27 vararg(x2
); // expected-error{{cannot pass object of non-trivial type 'X2' through variadic function; call will abort at runtime}}
29 vararg(x4
); // expected-error{{cannot pass object of non-trivial type 'X4' through variadic function; call will abort at runtime}}
31 vararg(g()); // expected-error{{cannot pass expression of type 'void' to variadic function}}
32 vararg({1, 2, 3}); // expected-error{{cannot pass initializer list to variadic function}}
44 (void)sizeof(f(getS()));