aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-04-14 20:11:31 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-04-14 20:11:31 +0000
commit6a570f610c101054e79af2fcdb73a10f8e3f337d (patch)
tree2c427c76ef97f343ba265d9904ec0f1e23111b67 /include
parent1ac39c2599b52acbf08e30c93ad358caced9deb5 (diff)
downloadclang-6a570f610c101054e79af2fcdb73a10f8e3f337d.tar.gz
Diagnose if a __thread or _Thread_local variable has a non-constant initializer
or non-trivial destructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179491 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 79c81c791a..17a7f00b63 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -5418,6 +5418,13 @@ def ext_in_class_initializer_non_constant : Extension<
"in-class initializer for static data member is not a constant expression; "
"folding it to a constant is a GNU extension">, InGroup<GNU>;
+def err_thread_dynamic_init : Error<
+ "initializer for thread-local variable must be a constant expression">;
+def err_thread_nontrivial_dtor : Error<
+ "type of thread-local variable has non-trivial destruction">;
+def note_use_thread_local : Note<
+ "use 'thread_local' to allow this">;
+
// C++ anonymous unions and GNU anonymous structs/unions
def ext_anonymous_union : Extension<
"anonymous unions are a C11 extension">, InGroup<C11>;