diff options
Diffstat (limited to 'clang/test/OpenMP/sections_firstprivate_messages.cpp')
-rw-r--r-- | clang/test/OpenMP/sections_firstprivate_messages.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/clang/test/OpenMP/sections_firstprivate_messages.cpp b/clang/test/OpenMP/sections_firstprivate_messages.cpp index ecee45900fe..6f9f502821d 100644 --- a/clang/test/OpenMP/sections_firstprivate_messages.cpp +++ b/clang/test/OpenMP/sections_firstprivate_messages.cpp @@ -170,6 +170,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; const int da[5] = {0}; @@ -281,7 +289,7 @@ int main(int argc, char **argv) { foo(); } #pragma omp parallel -#pragma omp sections firstprivate(h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}} +#pragma omp sections firstprivate(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be firstprivate}} { foo(); } |