blob: bb4726dd3309aec1bd384d42bbe289be5aaf56c0 [file] [log] [blame]
Douglas Gregor253cadf2011-05-21 16:27:21 +00001// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s
2
3struct X1 {
4 X1();
5};
6
7struct X2 {
8 X2();
9 ~X2();
10};
11
12void vararg(...);
13
14void f(X1 x1, X2 x2) {
15 vararg(x1); // okay
16 vararg(x2); // expected-error{{cannot pass object of non-trivial type 'X2' through variadic function; call will abort at runtime}}
17}