summaryrefslogtreecommitdiffstats
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.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/SemaCXX/vararg-non-pod.cpp b/test/SemaCXX/vararg-non-pod.cpp
index 55ec941..df0080f 100644
--- a/test/SemaCXX/vararg-non-pod.cpp
+++ b/test/SemaCXX/vararg-non-pod.cpp
@@ -56,15 +56,18 @@ void t4()
}
class E {
- E(int, ...);
+ E(int, ...); // expected-note 2{{implicitly declared private here}}
};
void t5()
{
C c(10);
- E e(10, c); // expected-warning{{cannot pass object of non-POD type 'C' through variadic constructor; call will abort at runtime}}
- (void)E(10, c); // expected-warning{{cannot pass object of non-POD type 'C' through variadic constructor; call will abort at runtime}}
+ E e(10, c); // expected-warning{{cannot pass object of non-POD type 'C' through variadic constructor; call will abort at runtime}} \
+ // expected-error{{calling a private constructor of class 'E'}}
+ (void)E(10, c); // expected-warning{{cannot pass object of non-POD type 'C' through variadic constructor; call will abort at runtime}} \
+ // expected-error{{calling a private constructor of class 'E'}}
+
}
// PR5761: unevaluated operands and the non-POD warning
OpenPOWER on IntegriCloud