diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:47:56 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-05-27 18:47:56 +0000 |
commit | 5e20cdd81c44a443562a09007668ffdf76c455af (patch) | |
tree | dbbd4047878da71c1a706e26ce05b4e7791b14cc /test/OpenMP/simd_private_messages.cpp | |
parent | d5f23b0b7528b5c3caed1ba14f897cc4aaa9e3c3 (diff) | |
download | src-434ab66796bbe752e77357049917ed2c57e74a5d.tar.gz src-434ab66796bbe752e77357049917ed2c57e74a5d.zip |
Vendor import of clang trunk r238337:vendor/clang/clang-trunk-r238337
Diffstat (limited to 'test/OpenMP/simd_private_messages.cpp')
-rw-r--r-- | test/OpenMP/simd_private_messages.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/OpenMP/simd_private_messages.cpp b/test/OpenMP/simd_private_messages.cpp index 56922e888b99..adef373b6a4e 100644 --- a/test/OpenMP/simd_private_messages.cpp +++ b/test/OpenMP/simd_private_messages.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s +// RUN: %clang_cc1 -verify -fopenmp %s void foo() { } @@ -85,6 +85,14 @@ template<class I, class C> 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); @@ -112,7 +120,7 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp simd private(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}} for (int k = 0; k < argc; ++k) ++k; - #pragma omp simd private(h) // expected-error {{threadprivate or thread local variable cannot be private}} + #pragma omp simd private(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be private}} for (int k = 0; k < argc; ++k) ++k; #pragma omp simd shared(i) // expected-error {{unexpected OpenMP clause 'shared' in directive '#pragma omp simd'}} for (int k = 0; k < argc; ++k) ++k; |