// Non-failure cases are covered in test/CodeGen/pass-object-size.c
voida(void*p__attribute__((pass_object_size)));//expected-error{{'pass_object_size' attribute takes one argument}}
voidb(void*p__attribute__((pass_object_size(1.0))));//expected-error{{'pass_object_size' attribute requires parameter 1 to be an integer constant}}
voidc(void*p__attribute__((pass_object_size(4))));//expected-error{{'pass_object_size' attribute requires integer constant between 0 and 3 inclusive}}
voidd(void*p__attribute__((pass_object_size(-1))));//expected-error{{'pass_object_size' attribute requires integer constant between 0 and 3 inclusive}}
voide(void*p__attribute__((pass_object_size(1ULL<<32))));//expected-error{{integer constant expression evaluates to value 4294967296 that cannot be represented in a 32-bit unsigned integer type}}
voidf(charp__attribute__((pass_object_size(0))));//expected-error{{'pass_object_size' attribute only applies to constant pointer arguments}}
voidg(constcharp__attribute__((pass_object_size(0))));//expected-error{{'pass_object_size' attribute only applies to constant pointer arguments}}
voidh(char*p__attribute__((pass_object_size(0)))){}//expected-error{{pass_object_size attribute only applies to constant pointer arguments}}
voidi(char*p__attribute__((pass_object_size(0))));// OK -- const is only necessary on definitions, not decls.
voidj(char*p__attribute__((pass_object_size(0),pass_object_size(1))));//expected-error{{'pass_object_size' attribute can only be applied once per parameter}}
void(*p3)(void*)=IsOverloaded;//expected-warning{{incompatible pointer types initializing 'void (*)(void *)' with an expression of type '<overloaded function type>'}} expected-note@-6{{candidate address cannot be taken because parameter 1 has pass_object_size attribute}} expected-note@-5{{type mismatch}}
void(*p4)(void*)=&IsOverloaded;//expected-warning{{incompatible pointer types initializing 'void (*)(void *)' with an expression of type '<overloaded function type>'}} expected-note@-7{{candidate address cannot be taken because parameter 1 has pass_object_size attribute}} expected-note@-6{{type mismatch}}
(&IsOverloaded)(&P);//expected-warning{{incompatible pointer types passing 'int *' to parameter of type 'char *'}} expected-note@36{{passing argument to parameter 'p' here}}