// RUN: %clang_cc1 %s -verify -fsyntax-only
int good ;
static int local_ok ;
int hidden_ok ;
const int still_cant_be_const ;
extern int external_rejected ;
// expected-error@-1 {{variable 'external_rejected' cannot be declared both 'extern' and with the 'loader_uninitialized' attribute}}
;
extern S incomplete_external_rejected ;
// expected-error@-1 {{variable 'incomplete_external_rejected' cannot be declared both 'extern' and with the 'loader_uninitialized' attribute}}
int noargs ;
// expected-error@-1 {{'loader_uninitialized' attribute takes no arguments}}
int init_rejected = 42;
// expected-error@-1 {{variable with 'loader_uninitialized' attribute cannot have an initializer}}
void
// expected-warning@-1 {{'loader_uninitialized' attribute only applies to global variables}}
;
// expected-warning@-1 {{'loader_uninitialized' attribute only applies to global variables}}
int redef_attr_first ;
int redef_attr_first;
// expected-error@-1 {{redefinition of 'redef_attr_first'}}
// expected-note@-3 {{previous definition is here}}
int redef_attr_second;
int redef_attr_second ;
// expected-warning@-1 {{attribute declaration must precede definition}}
// expected-note@-3 {{previous definition is here}}
// expected-error@-3 {{redefinition of 'redef_attr_second'}}
// expected-note@-5 {{previous definition is here}}
;
trivial default_ok ;
trivial value_rejected ;
// expected-error@-1 {{variable with 'loader_uninitialized' attribute cannot have an initializer}}
;
nontrivial needs_trivial_ctor ;
// expected-error@-1 {{variable with 'loader_uninitialized' attribute must have a trivial default constructor}}
;
Incomplete incomplete ;
// expected-error@-1 {{variable has incomplete type 'Incomplete'}}
// expected-note@-3 {{forward declaration of 'Incomplete'}}
;
// expected-error@-1 {{variable has incomplete type 'struct Incomplete'}}
// expected-note@-7 {{forward declaration of 'Incomplete'}}