From c49018d9cce52d8c9f34b44865ec3ba8e89a1488 Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 12 Jun 2011 15:46:16 +0000 Subject: Vendor import of clang trunk r132879: http://llvm.org/svn/llvm-project/cfe/trunk@132879 --- test/CXX/expr/expr.post/expr.call/p7-0x.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/CXX/expr/expr.post/expr.call/p7-0x.cpp (limited to 'test/CXX/expr/expr.post/expr.call') diff --git a/test/CXX/expr/expr.post/expr.call/p7-0x.cpp b/test/CXX/expr/expr.post/expr.call/p7-0x.cpp new file mode 100644 index 0000000..bb4726d --- /dev/null +++ b/test/CXX/expr/expr.post/expr.call/p7-0x.cpp @@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s + +struct X1 { + X1(); +}; + +struct X2 { + X2(); + ~X2(); +}; + +void vararg(...); + +void f(X1 x1, X2 x2) { + vararg(x1); // okay + vararg(x2); // expected-error{{cannot pass object of non-trivial type 'X2' through variadic function; call will abort at runtime}} +} -- cgit v1.1