void foo (int *p, ...) { va_list args; va_start (args, p); vararg (p, args); va_end (args); }
void test1 (void) { int a = (int) (long long) __builtin_return_address (0); vararg (0, a); }
// CHECK: define void @_Z4test1X void test(X x) { // CHECK: call void @llvm.trap() vararg(x); // CHECK: ret void }
void function_as_vararg() { // CHECK: define {{.*}}function_as_vararg // CHECK-NOT: llvm.trap vararg(0, focus_changed_cb); }
void f(X1 x1, X2 x2) { vararg(x1); // okay vararg(x2); // expected-error{{cannot pass object of non-trivial type 'X2' through variadic function; call will abort at runtime}} }
void f(X1 x1, X2 x2, X3 x3, X4 x4) { vararg(x1); // OK vararg(x2); // expected-error{{cannot pass object of non-trivial type 'X2' through variadic function; call will abort at runtime}} vararg(x3); // OK vararg(x4); // expected-error{{cannot pass object of non-trivial type 'X4' through variadic function; call will abort at runtime}} }