2009-12-16 04:14:24 +08:00
// RUN: %clang_cc1 %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
2013-03-19 06:52:47 +08:00
typedef union < anonymous > __mbstate_t ; // expected-error {{declaration of anonymous union must be a definition}} expected-warning {{typedef requires a name}}
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
}
2010-04-09 05:33:23 +08:00
int ; // expected-warning {{declaration does not declare anything}}
2013-03-19 06:52:47 +08:00
typedef int ; // expected-warning {{typedef requires a name}}
2010-04-09 05:33:23 +08:00
const int ; // expected-warning {{declaration does not declare anything}}
struct ; // expected-error {{declaration of anonymous struct must be a definition}} // expected-warning {{declaration does not declare anything}}
2008-12-28 23:28:59 +08:00
typedef int I ;
2010-04-09 05:33:23 +08:00
I ; // expected-warning {{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}}