summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/sections_private_messages.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/OpenMP/sections_private_messages.cpp')
-rw-r--r--clang/test/OpenMP/sections_private_messages.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/clang/test/OpenMP/sections_private_messages.cpp b/clang/test/OpenMP/sections_private_messages.cpp
index 8b330bf7105..ea5fe39c080 100644
--- a/clang/test/OpenMP/sections_private_messages.cpp
+++ b/clang/test/OpenMP/sections_private_messages.cpp
@@ -123,6 +123,14 @@ int foomain(I argc, C **argv) {
return 0;
}
+namespace A {
+double x;
+#pragma omp threadprivate(x) // expected-note {{defined as threadprivate or thread local}}
+}
+namespace B {
+using A::x;
+}
+
int main(int argc, char **argv) {
S4 e(4);
S5 g(5);
@@ -172,7 +180,7 @@ int main(int argc, char **argv) {
{
foo();
}
-#pragma omp sections private(h) // expected-error {{threadprivate or thread local variable cannot be private}}
+#pragma omp sections private(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be private}}
{
foo();
}
OpenPOWER on IntegriCloud