summaryrefslogtreecommitdiffstats
path: root/test/CXX/expr/expr.post/expr.call/p7-0x.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CXX/expr/expr.post/expr.call/p7-0x.cpp')
-rw-r--r--test/CXX/expr/expr.post/expr.call/p7-0x.cpp17
1 files changed, 17 insertions, 0 deletions
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}}
+}
OpenPOWER on IntegriCloud