summaryrefslogtreecommitdiff
path: root/test/SemaCXX/vararg-non-pod.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/vararg-non-pod.cpp')
-rw-r--r--test/SemaCXX/vararg-non-pod.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/SemaCXX/vararg-non-pod.cpp b/test/SemaCXX/vararg-non-pod.cpp
index 1c5fe74a154d6..390f58b1b7b38 100644
--- a/test/SemaCXX/vararg-non-pod.cpp
+++ b/test/SemaCXX/vararg-non-pod.cpp
@@ -51,6 +51,18 @@ void t4()
D d;
- d(10, c); // expected-warning{{Line 48: cannot pass object of non-POD type 'class C' through variadic method; call will abort at runtime}}
+ d(10, c); // expected-warning{{cannot pass object of non-POD type 'class C' through variadic method; call will abort at runtime}}
d(10, version);
}
+
+class E {
+ E(int, ...);
+};
+
+void t5()
+{
+ C c(10);
+
+ E e(10, c); // expected-warning{{cannot pass object of non-POD type 'class C' through variadic constructor; call will abort at runtime}}
+ (void)E(10, c); // expected-warning{{cannot pass object of non-POD type 'class C' through variadic constructor; call will abort at runtime}}
+} \ No newline at end of file