diff options
author | Bob Wilson <bob.wilson@apple.com> | 2014-11-21 06:52:52 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2014-11-21 06:52:52 +0000 |
commit | 7a620261c6f04cc9d22caa750f9bf2b084690dbd (patch) | |
tree | 3c39e5bd2f5362475bf95fd0bcf592b352915fd1 /test/SemaCXX/cxx11-thread-unsupported.cpp | |
parent | 50a1b4104c3ea7e1a8c61f9b5efbb62fd0fb1e53 (diff) | |
download | clang-7a620261c6f04cc9d22caa750f9bf2b084690dbd.tar.gz |
Fix missing diagnostic for unsupported TLS for some thread_local variables.
Clang r181627 moved a check for block-scope variables into this code for
handling thread storage class specifiers, but in the process, it broke the
logic for checking if the target supports TLS. Fix this with some simple
restructuring of the code. rdar://problem/18796883
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222512 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/cxx11-thread-unsupported.cpp')
-rw-r--r-- | test/SemaCXX/cxx11-thread-unsupported.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/SemaCXX/cxx11-thread-unsupported.cpp b/test/SemaCXX/cxx11-thread-unsupported.cpp new file mode 100644 index 0000000000..d3fcf82ef4 --- /dev/null +++ b/test/SemaCXX/cxx11-thread-unsupported.cpp @@ -0,0 +1,5 @@ +// RUN: %clang_cc1 -std=c++11 -triple=x86_64-apple-macosx10.6 -verify %s + +void f() { + thread_local int x; // expected-error {{thread-local storage is not supported for the current target}} +} |