Home | History | Annotate | Download | only in expr.call
      1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
      2 
      3 struct X1 {
      4   X1();
      5 };
      6 
      7 struct X2 {
      8   X2();
      9   ~X2();
     10 };
     11 
     12 void vararg(...);
     13 
     14 void f(X1 x1, X2 x2) {
     15   vararg(x1); // okay
     16   vararg(x2); // expected-error{{cannot pass object of non-trivial type 'X2' through variadic function; call will abort at runtime}}
     17 }
     18 
     19 
     20 namespace PR11131 {
     21   struct S;
     22 
     23   S &getS();
     24 
     25   void f(...);
     26 
     27   void g() {
     28     (void)sizeof(f(getS()));
     29   }
     30 }
     31