// RUN: %clang_cc1 -fsyntax-only -verify %s -triple x86_64-linux-gnu -Wincompatible-pointer-types
//
// Tests for the pass_object_size attribute
// Non-failure cases are covered in test/CodeGen/pass-object-size.c
void ; //expected-error{{'pass_object_size' attribute takes one argument}}
void ; //expected-error{{'pass_object_size' attribute requires parameter 1 to be an integer constant}}
void ; //expected-error{{'pass_object_size' attribute requires integer constant between 0 and 3 inclusive}}
void ; //expected-error{{'pass_object_size' attribute requires integer constant between 0 and 3 inclusive}}
void ; //expected-error{{integer constant expression evaluates to value 4294967296 that cannot be represented in a 32-bit unsigned integer type}}
void ; //expected-error{{'pass_object_size' attribute only applies to constant pointer arguments}}
void ; //expected-error{{'pass_object_size' attribute only applies to constant pointer arguments}}
void //expected-error{{pass_object_size attribute only applies to constant pointer arguments}}
void ; // OK -- const is only necessary on definitions, not decls.
void ; //expected-error{{'pass_object_size' attribute can only be applied once per parameter}}
void ; // expected-error {{'pass_dynamic_object_size' attribute takes one argument}}
void ; // expected-error {{'pass_dynamic_object_size' attribute only applies to constant pointer arguments}}
void overloaded; //expected-note{{previous declaration is here}}
void overloaded; //expected-error{{conflicting pass_object_size attributes on parameters}}
void overloaded; //expected-note{{previous declaration is here}}
void overloaded; //expected-error{{conflicting pass_object_size attributes on parameters}}
void overloaded; //expected-note{{previous declaration is here}}
void overloaded; //expected-error{{conflicting pass_object_size attributes on parameters}}
void ;
void overloaded;
void overloaded;
void ;
void overloaded; // expected-note 2 {{candidate address cannot be taken because parameter 1 has pass_object_size attribute}}
// char* inestead of void* is intentional
void overloaded; // expected-note{{passing argument to parameter 'p' here}} expected-note 2 {{type mismatch}}
void
void ; // expected-note {{previous declaration is here}}
void ; // expected-error {{conflicting pass_object_size attributes on parameters}}
void ; // expected-note {{previous declaration is here}}
void ; // expected-error {{conflicting pass_object_size attributes on parameters}}