// RUN: %clang_cc1 -triple x86_64-linux-gnu -Wno-strict-prototypes -fsyntax-only -verify %s
void ;
void ;
void
void ;
void ;
void
int ;
// expected-error@-1 {{multiversioned function must have a prototype}}
// expected-note@+1 {{function multiversioning caused by this declaration}}
int ;
// The following should all be legal, since they are just redeclarations.
int ;
int
int
int
int ;
int
int
int
int ;
int
int
int
int ;
int
int
int
// expected-error@+2 {{redefinition of 'redef'}}
// expected-note@-2 {{previous definition is here}}
int
int
// expected-error@+2 {{redefinition of 'redef2'}}
// expected-note@-2 {{previous definition is here}}
int
int
int
// expected-error@+1 {{function declaration cannot become a multiversioned function after first usage}}
int
int
//expected-error@+2 {{multiversioned function redeclarations require identical target attributes}}
//expected-note@-2 {{previous declaration is here}}
int
// allow this, since we want to treat the 1st one as fwd-decl of the sandybridge version.
int ;
int
int
int ;
int ;
// expected-error@-1 {{function declaration is missing 'target' attribute in a multiversioned function}}
// expected-note@+1 {{function multiversioning caused by this declaration}}
int ;
void ;
//expected-error@+2 {{attribute 'target' multiversioning cannot be combined with attribute 'no_caller_saved_registers'}}
void
;
//expected-error@+1 {{attribute 'target' multiversioning cannot be combined with attribute 'no_caller_saved_registers'}}
void ;
//expected-error@+2 {{attribute 'target' multiversioning cannot be combined with attribute 'no_caller_saved_registers'}}
//expected-note@+2 {{function multiversioning caused by this declaration}}
void ;
void ;
void ;
void ;
//expected-error@+1 {{attribute 'target' multiversioning cannot be combined}}
void ;
int ;
// expected-error@+1 {{multiversioned function declaration has a different calling convention}}
__vectorcall int ;
int ;
// expected-error@+1 {{multiversioned function declaration has a different return type}}
short ;
void ;
void ;
void ;
void ;
int ;
int ;
// expected-error@+1 {{function declaration is missing 'target' attribute in a multiversioned function}}
int ;
int ;
// expected-error@+2 {{conflicting types for 'bad_overload2'}}
// expected-note@-2 {{previous declaration is here}}
int ;
// expected-error@+2 {{conflicting types for 'bad_overload2'}}
// expected-note@-5 {{previous declaration is here}}
int ;
// expected-error@+2 {{attribute 'target' multiversioning cannot be combined with attribute 'overloadable'}}
// expected-note@+2 {{function multiversioning caused by this declaration}}
int ;
int ;
int ;
// expected-error@+1 {{attribute 'target' multiversioning cannot be combined with attribute 'overloadable'}}
int ;
int ;
int ;
int ;
int ;
int ;
int ;
int ;
int ;
// expected-error@+2 {{attribute 'target' multiversioning cannot be combined with attribute 'overloadable'}}
// expected-note@+2 {{function multiversioning caused by this declaration}}
int ;
int ;
int ;
int ;
// expected-error@+2 {{attribute 'target' multiversioning cannot be combined with attribute 'overloadable'}}
// expected-note@+2 {{function multiversioning caused by this declaration}}
int ;
int ;
int ;
int ;
int ;
int ;
int ;
int ;