p7-0x.cpp revision 762bb9d0ad20320b9f97a841dce57ba5e8e48b07
1// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %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} 18