diff options
| author | Alexey Bataev <a.bataev@hotmail.com> | 2018-10-29 20:17:42 +0000 |
|---|---|---|
| committer | Alexey Bataev <a.bataev@hotmail.com> | 2018-10-29 20:17:42 +0000 |
| commit | f07946e1011b7874fda9046f9a6717fa1586ce7c (patch) | |
| tree | 194c51a1f0287141f6b05df055a92cf65393311b /clang/test/OpenMP/task_firstprivate_messages.cpp | |
| parent | c045c557b07a084a5dc2de336fdc807e87589963 (diff) | |
| download | bcm5719-llvm-f07946e1011b7874fda9046f9a6717fa1586ce7c.tar.gz bcm5719-llvm-f07946e1011b7874fda9046f9a6717fa1586ce7c.zip | |
[OPENMP]Fix PR39372: Does not complain about loop bound variable not
being shared.
According to the standard, the variables with unspecified data-sharing
attributes in presence of `default(none)` clause must be reported to
users. Compiler did not generate error reports for the variables used in
other OpenMP regions. Patch fixes this.
llvm-svn: 345533
Diffstat (limited to 'clang/test/OpenMP/task_firstprivate_messages.cpp')
| -rw-r--r-- | clang/test/OpenMP/task_firstprivate_messages.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/OpenMP/task_firstprivate_messages.cpp b/clang/test/OpenMP/task_firstprivate_messages.cpp index 1a64f2abf3c..d970f097a58 100644 --- a/clang/test/OpenMP/task_firstprivate_messages.cpp +++ b/clang/test/OpenMP/task_firstprivate_messages.cpp @@ -47,7 +47,7 @@ extern const int f; class S4 { int a; S4(); - S4(const S4 &s4); // expected-note 2 {{implicitly declared private here}} + S4(const S4 &s4); // expected-note 16 {{implicitly declared private here}} public: S4(int v) : a(v) {} @@ -55,7 +55,7 @@ public: class S5 { int a; S5() : a(0) {} - S5(const S5 &s5) : a(s5.a) {} // expected-note 2 {{implicitly declared private here}} + S5(const S5 &s5) : a(s5.a) {} // expected-note 16 {{implicitly declared private here}} public: S5(int v) : a(v) {} @@ -100,7 +100,7 @@ int main(int argc, char **argv) { #pragma omp task firstprivate(da) #pragma omp task firstprivate(S2::S2s) #pragma omp task firstprivate(S2::S2sc) -#pragma omp task firstprivate(e, g) // expected-error 2 {{calling a private constructor of class 'S4'}} expected-error 2 {{calling a private constructor of class 'S5'}} +#pragma omp task firstprivate(e, g) // expected-error 16 {{calling a private constructor of class 'S4'}} expected-error 16 {{calling a private constructor of class 'S5'}} #pragma omp task firstprivate(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be firstprivate}} #pragma omp task private(i), firstprivate(i) // expected-error {{private variable cannot be firstprivate}} expected-note{{defined as private}} foo(); |

