vararg-non-pod.mm revision a5728872c7702ddd09537c95bc3cbd20e1f2fb09
1// RUN: %clang_cc1 -fsyntax-only -verify %s -Wnon-pod-varargs 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