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