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