// RUN: %clang_cc1 -triple x86_64-unknown-unknown -std=c++11 -Wno-gcc-compat -verify %s
// Error cases.
int unknown_attr;
// expected-warning@-1 {{unknown attribute 'this_attribute_does_not_exist' ignored}}
int attr_on_type;
// expected-error@-1 {{'unused' attribute cannot be applied to types}}
int * attr_on_ptr;
// expected-warning@-1 {{attribute 'unused' ignored, because it cannot be applied to a type}}
void ;
// expected-warning@-1 {{'fastcall' calling convention is not supported for this target}}
void ;
// expected-warning@-1 {{'fastcall' calling convention is not supported for this target}}
// expected-warning@-2 {{'stdcall' calling convention is not supported for this target}}
__stdcall void ;
// expected-warning@-1 {{'fastcall' calling convention is not supported for this target}}
// expected-warning@-2 {{'__stdcall' calling convention is not supported for this target}}
void ;
// expected-warning@-1 {{'fastcall' calling convention is not supported for this target}}
// expected-warning@-2 {{'stdcall' calling convention is not supported for this target}}
void pr17424_5 ;
// expected-warning@-1 {{'fastcall' calling convention is not supported for this target}}
// Valid cases.
void aliasb ;
void
void aliasa ;
extern PR22493 ;
int aligned;
void aligned_fn ;
;
void always_inline ;
__thread int tls_model ;
void
void deprecated1 ; // expected-note {{here}}
void ; // expected-note {{here}}
void
void ; // expected-error {{takes no arguments}}
void nonnull ; // expected-warning {{applied to function with no pointer arguments}}
// [[gnu::noreturn]] appertains to a declaration, and marks the innermost
// function declarator in that declaration as being noreturn.
int noreturn ; // expected-warning {{'noreturn' only applies to function types}}
int ;
int ; // expected-warning {{cannot be applied to a type}}
int noreturn_fn_3 ;
int ;
int = &noreturn_fn_1; // expected-error {{cannot initialize}}
int = &noreturn_fn_3;
int = &noreturn_fn_1; // expected-error {{cannot initialize}}
int = &noreturn_fn_3;
;
static_assert;