diff options
Diffstat (limited to 'test/OpenMP/single_private_messages.cpp')
-rw-r--r-- | test/OpenMP/single_private_messages.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/OpenMP/single_private_messages.cpp b/test/OpenMP/single_private_messages.cpp index 8bdc48f..0e04e0f 100644 --- a/test/OpenMP/single_private_messages.cpp +++ b/test/OpenMP/single_private_messages.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s +// RUN: %clang_cc1 -verify -fopenmp %s void foo() { } @@ -91,6 +91,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); @@ -118,7 +126,7 @@ int main(int argc, char **argv) { foo(); #pragma omp single private(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}} foo(); -#pragma omp single private(h) // expected-error {{threadprivate or thread local variable cannot be private}} +#pragma omp single private(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be private}} foo(); #pragma omp single shared(i) // expected-error {{unexpected OpenMP clause 'shared' in directive '#pragma omp single'}} foo(); |