// RUN: %clang_cc1 -triple i686-pc-win32 -std=c++11 -fms-extensions -fms-compatibility-version=18.00 -verify %s
// RUN: %clang_cc1 -triple i686-pc-win32 -std=c++11 -fms-extensions -fms-compatibility-version=19.00 -verify %s
__thread __declspec int a; // expected-error {{already has a thread-local storage specifier}}
__declspec __thread int b; // expected-error {{already has a thread-local storage specifier}}
__declspec int ; // expected-warning {{only applies to variables}}
__declspec int d;
int ;
__declspec int e = ;
__declspec int e = ; // expected-error {{must be a constant expression}} expected-note {{thread_local}}
;
__declspec HasCtor f;
__declspec HasCtor f; // expected-error {{must be a constant expression}} expected-note {{thread_local}}
;
__declspec HasDtor g;
__declspec HasCtor g; // expected-error {{must be a constant expression}} expected-note {{thread_local}}
;
__declspec HasDefaultedDefaultCtor h;
;
__declspec HasConstexprCtor ;
int
extern __declspec int fwd_thread_var;
__declspec int fwd_thread_var = 5;
extern int fwd_thread_var_mismatch; // expected-note {{previous declaration}}
__declspec int fwd_thread_var_mismatch = 5; // expected-error-re {{thread-local {{.*}} follows non-thread-local}}
extern __declspec int thread_mismatch_2; // expected-note {{previous declaration}}
int thread_mismatch_2 = 5; // expected-error-re {{non-thread-local {{.*}} follows thread-local}}
typedef __declspec int tls_int_t; // expected-warning {{only applies to variables}}