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.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/SemaCXX/vararg-non-pod.cpp b/test/SemaCXX/vararg-non-pod.cpp
index 86b560e814c2..da06d957180e 100644
--- a/test/SemaCXX/vararg-non-pod.cpp
+++ b/test/SemaCXX/vararg-non-pod.cpp
@@ -123,3 +123,21 @@ int t9(int n) {
// Make sure the error works in potentially-evaluated sizeof
return (int)sizeof(*(Helper(Foo()), (int (*)[n])0)); // expected-warning{{cannot pass object of non-POD type}}
}
+
+// PR14057
+namespace t10 {
+ struct F {
+ F();
+ };
+
+ struct S {
+ void operator()(F, ...);
+ };
+
+ void foo() {
+ S s;
+ F f;
+ s.operator()(f);
+ s(f);
+ }
+}