summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/cxx11-thread-unsupported.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2014-11-21 06:52:52 +0000
committerBob Wilson <bob.wilson@apple.com>2014-11-21 06:52:52 +0000
commitd8f4165b0df1630597f7f1c626163fb451c03d9a (patch)
tree2c22c53a2ad955181a58529f1716bd3d89c0a364 /clang/test/SemaCXX/cxx11-thread-unsupported.cpp
parentd64bc4bee6eab912b3a02ab9cab13f13045ba0ea (diff)
downloadbcm5719-llvm-d8f4165b0df1630597f7f1c626163fb451c03d9a.tar.gz
bcm5719-llvm-d8f4165b0df1630597f7f1c626163fb451c03d9a.zip
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 llvm-svn: 222512
Diffstat (limited to 'clang/test/SemaCXX/cxx11-thread-unsupported.cpp')
-rw-r--r--clang/test/SemaCXX/cxx11-thread-unsupported.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/cxx11-thread-unsupported.cpp b/clang/test/SemaCXX/cxx11-thread-unsupported.cpp
new file mode 100644
index 00000000000..d3fcf82ef41
--- /dev/null
+++ b/clang/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}}
+}
OpenPOWER on IntegriCloud