diff options
author | dim <dim@FreeBSD.org> | 2015-05-27 18:47:56 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-05-27 18:47:56 +0000 |
commit | 3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65 (patch) | |
tree | dbbd4047878da71c1a706e26ce05b4e7791b14cc /test/SemaCXX/declspec-thread.cpp | |
parent | 38d6f2e7f2ce51a5b3836d26596c6c34a3288752 (diff) | |
download | FreeBSD-src-3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65.zip FreeBSD-src-3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65.tar.gz |
Vendor import of clang trunk r238337:
https://llvm.org/svn/llvm-project/cfe/trunk@238337
Diffstat (limited to 'test/SemaCXX/declspec-thread.cpp')
-rw-r--r-- | test/SemaCXX/declspec-thread.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/test/SemaCXX/declspec-thread.cpp b/test/SemaCXX/declspec-thread.cpp index 0ace9a6..2b931bb 100644 --- a/test/SemaCXX/declspec-thread.cpp +++ b/test/SemaCXX/declspec-thread.cpp @@ -1,17 +1,30 @@ -// RUN: %clang_cc1 -triple i686-pc-win32 -std=c++11 -fms-extensions -verify %s +// 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(thread) int a; // expected-error {{already has a thread-local storage specifier}} __declspec(thread) __thread int b; // expected-error {{already has a thread-local storage specifier}} __declspec(thread) int c(); // expected-warning {{only applies to variables}} __declspec(thread) int d; int foo(); +#if _MSC_VER >= 1900 +__declspec(thread) int e = foo(); +#else __declspec(thread) int e = foo(); // expected-error {{must be a constant expression}} expected-note {{thread_local}} +#endif struct HasCtor { HasCtor(); int x; }; +#if _MSC_VER >= 1900 +__declspec(thread) HasCtor f; +#else __declspec(thread) HasCtor f; // expected-error {{must be a constant expression}} expected-note {{thread_local}} +#endif struct HasDtor { ~HasDtor(); int x; }; -__declspec(thread) HasDtor g; // expected-error {{non-trivial destruction}} expected-note {{thread_local}} +#if _MSC_VER >= 1900 +__declspec(thread) HasDtor g; +#else +__declspec(thread) HasCtor g; // expected-error {{must be a constant expression}} expected-note {{thread_local}} +#endif struct HasDefaultedDefaultCtor { HasDefaultedDefaultCtor() = default; |