summaryrefslogtreecommitdiffstats
path: root/clang/test/OpenMP/parallel_sections_lastprivate_messages.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/OpenMP/parallel_sections_lastprivate_messages.cpp')
-rw-r--r--clang/test/OpenMP/parallel_sections_lastprivate_messages.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/clang/test/OpenMP/parallel_sections_lastprivate_messages.cpp b/clang/test/OpenMP/parallel_sections_lastprivate_messages.cpp
index fd358b2106b..067a5979d13 100644
--- a/clang/test/OpenMP/parallel_sections_lastprivate_messages.cpp
+++ b/clang/test/OpenMP/parallel_sections_lastprivate_messages.cpp
@@ -142,6 +142,14 @@ int foomain(int argc, char **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) {
const int d = 5; // expected-note {{constant variable is predetermined as shared}}
const int da[5] = {0}; // expected-note {{constant variable is predetermined as shared}}
@@ -232,7 +240,7 @@ int main(int argc, char **argv) {
{
foo();
}
-#pragma omp parallel sections lastprivate(h) // expected-error {{threadprivate or thread local variable cannot be lastprivate}}
+#pragma omp parallel sections lastprivate(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be lastprivate}}
{
foo();
}
OpenPOWER on IntegriCloud