2009-03-24 10:24:46 +08:00
// RUN: clang-cc %s -fsyntax-only -verify
2007-07-25 08:24:17 +08:00
2008-12-28 23:28:59 +08:00
// See Sema::ParsedFreeStandingDeclSpec about the double diagnostic
typedef union < anonymous > __mbstate_t ; // expected-error {{declaration of anonymous union must be a definition}} expected-error {{declaration does not declare anything}}
2008-04-02 09:05:10 +08:00
// PR2017
void x ( ) ;
int a ( ) {
2008-11-24 09:28:17 +08:00
int r [ x ( ) ] ; // expected-error {{size of array has non-integer type 'void'}}
2009-04-13 04:51:10 +08:00
static y ? ; / / expected - error { { unknown type name ' y ' } } \
2009-11-04 03:26:08 +08:00
expected - error { { expected identifier or ' ( ' } }
2008-04-02 09:05:10 +08:00
}
2008-12-28 23:28:59 +08:00
int ; // expected-error {{declaration does not declare anything}}
typedef int ; // expected-error {{declaration does not declare anything}}
const int ; // expected-error {{declaration does not declare anything}}
struct ; // expected-error {{declaration of anonymous struct must be a definition}} // expected-error {{declaration does not declare anything}}
typedef int I ;
I ; // expected-error {{declaration does not declare anything}}
2009-05-13 05:44:00 +08:00
// rdar://6880449
register int test1 ; // expected-error {{illegal storage class on file-scoped variable}}
register int test2 __asm__ ( " edi " ) ; // expected-error {{global register variables are not supported}}