vararg-non-pod.mm revision 672c91db00d28187600dd18ef6c524ff45e95ef2
1// RUN: clang -fsyntax-only -verify %s
2
3extern char version[];
4
5@protocol P;
6
7class C {
8public:
9  C(int);
10};
11
12@interface D 
13- (void)g:(int)a, ...;
14@end
15
16void t1(D *d)
17{
18  C c(10);
19
20  [d g:10, c]; // expected-warning{{cannot pass object of non-POD type 'class C' through variadic method; call will abort at runtime}}
21  [d g:10, version];
22}
23
24void t2(D *d, id p)
25{
26  [d g:10, p];
27}
28
29void t3(D *d, id<P> p)
30{
31  [d g:10, p];
32}
33