summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/thread-specifier.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/thread-specifier.c')
-rw-r--r--clang/test/Sema/thread-specifier.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/clang/test/Sema/thread-specifier.c b/clang/test/Sema/thread-specifier.c
index ca6c41192b2..426a2972619 100644
--- a/clang/test/Sema/thread-specifier.c
+++ b/clang/test/Sema/thread-specifier.c
@@ -59,11 +59,18 @@ int f(__thread int t7) { // expected-error {{' is only allowed on variable decla
}
__thread typedef int t14; // expected-error-re {{cannot combine with previous '(__thread|_Thread_local|thread_local)' declaration specifier}}
-__thread int t15; // expected-note {{previous definition is here}}
+__thread int t15; // expected-note {{previous declaration is here}}
extern int t15; // expected-error {{non-thread-local declaration of 't15' follows thread-local declaration}}
-extern int t16; // expected-note {{previous definition is here}}
+extern int t16; // expected-note {{previous declaration is here}}
__thread int t16; // expected-error {{thread-local declaration of 't16' follows non-thread-local declaration}}
+#ifdef CXX11
+extern thread_local int t17; // expected-note {{previous declaration is here}}
+_Thread_local int t17; // expected-error {{thread-local declaration of 't17' with static initialization follows declaration with dynamic initialization}}
+extern _Thread_local int t18; // expected-note {{previous declaration is here}}
+thread_local int t18; // expected-error {{thread-local declaration of 't18' with dynamic initialization follows declaration with static initialization}}
+#endif
+
// PR13720
__thread int thread_int;
int *thread_int_ptr = &thread_int;
OpenPOWER on IntegriCloud