diff options
Diffstat (limited to 'clang/test')
38 files changed, 357 insertions, 349 deletions
diff --git a/clang/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp index 655d7117d5c..8d93fbbee6d 100644 --- a/clang/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp @@ -20,7 +20,7 @@ public: const S2 &operator =(const S2&) const; S2 &operator =(const S2&); static float S2s; // expected-note {{static data member is predetermined as shared}} - static const float S2sc; // expected-note {{static data member is predetermined as shared}} + static const float S2sc; // expected-note {{'S2sc' declared here}} }; const float S2::S2sc = 0; const S2 b; @@ -33,9 +33,9 @@ public: S3() : a(0) {} S3(S3 &s3) : a(s3.a) {} }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note 3 {{implicitly declared private here}} @@ -171,8 +171,8 @@ 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = {0}; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); S3 m; @@ -221,7 +221,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}} expected-error {{incomplete type 'S1' where a complete type is required}} expected-warning {{Non-trivial type 'const S2' is mapped, only trivial types are guaranteed to be mapped correctly}} expected-warning {{Non-trivial type 'const S3' is mapped, only trivial types are guaranteed to be mapped correctly}} +#pragma omp distribute parallel for lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be lastprivate}} expected-error 2 {{const-qualified variable cannot be lastprivate}} expected-error {{incomplete type 'S1' where a complete type is required}} expected-warning {{Non-trivial type 'const S2' is mapped, only trivial types are guaranteed to be mapped correctly}} expected-warning {{Non-trivial type 'const S3' is mapped, only trivial types are guaranteed to be mapped correctly}} for (i = 0; i < argc; ++i) foo(); #pragma omp target @@ -241,12 +241,12 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}} expected-warning {{Non-trivial type 'const S3 [5]' is mapped, only trivial types are guaranteed to be mapped correctly}} +#pragma omp distribute parallel for lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} expected-warning {{Non-trivial type 'const S3 [5]' is mapped, only trivial types are guaranteed to be mapped correctly}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for lastprivate(da) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp distribute parallel for lastprivate(da) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); int xa; @@ -262,7 +262,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp distribute parallel for lastprivate(S2::S2sc) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp index 58bc1fcd6a2..e7f2b7da3fe 100644 --- a/clang/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp @@ -20,7 +20,7 @@ public: const S2 &operator =(const S2&) const; S2 &operator =(const S2&); static float S2s; // expected-note {{static data member is predetermined as shared}} - static const float S2sc; // expected-note {{static data member is predetermined as shared}} + static const float S2sc; // expected-note {{'S2sc' declared here}} }; const float S2::S2sc = 0; const S2 b; @@ -33,9 +33,9 @@ public: S3() : a(0) {} S3(S3 &s3) : a(s3.a) {} }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note 3 {{implicitly declared private here}} @@ -171,8 +171,8 @@ 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = {0}; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); S3 m; @@ -221,7 +221,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}} expected-error {{incomplete type 'S1' where a complete type is required}} +#pragma omp distribute parallel for simd lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be lastprivate}} expected-error 2 {{const-qualified variable cannot be lastprivate}} expected-error {{incomplete type 'S1' where a complete type is required}} for (i = 0; i < argc; ++i) foo(); #pragma omp target @@ -241,12 +241,12 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp distribute parallel for simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd lastprivate(da) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp distribute parallel for simd lastprivate(da) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); int xa; @@ -262,7 +262,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp distribute parallel for simd lastprivate(S2::S2sc) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/distribute_private_messages.cpp b/clang/test/OpenMP/distribute_private_messages.cpp index 3cf2fdc228b..55c13a00bbc 100644 --- a/clang/test/OpenMP/distribute_private_messages.cpp +++ b/clang/test/OpenMP/distribute_private_messages.cpp @@ -24,9 +24,9 @@ class S3 { public: S3():a(0) { } }; -const S3 c; // expected-note {{predetermined as shared}} -const S3 ca[5]; // expected-note {{predetermined as shared}} -extern const int f; // expected-note {{predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note {{implicitly declared private here}} @@ -45,8 +45,8 @@ S3 h; int main(int argc, char **argv) { - const int d = 5; // expected-note {{predetermined as shared}} - const int da[5] = { 0 }; // expected-note {{predetermined as shared}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = { 0 }; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); int i; @@ -67,15 +67,15 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp distribute private (S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; - #pragma omp distribute private (a, b, c, d, f) // expected-error {{private variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be private}} + #pragma omp distribute private (a, b, c, d, f) // expected-error {{private variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be private}} expected-error 2 {{const-qualified variable cannot be private}} for (int k = 0; k < argc; ++k) ++k; #pragma omp distribute private (argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; #pragma omp distribute private(ba) for (int k = 0; k < argc; ++k) ++k; - #pragma omp distribute private(ca) // expected-error {{shared variable cannot be private}} + #pragma omp distribute private(ca) // expected-error {{const-qualified variable without mutable fields cannot be private}} for (int k = 0; k < argc; ++k) ++k; - #pragma omp distribute private(da) // expected-error {{shared variable cannot be private}} + #pragma omp distribute private(da) // expected-error {{const-qualified variable cannot be private}} for (int k = 0; k < argc; ++k) ++k; #pragma omp distribute private(S2::S2s) // expected-error {{shared variable cannot be private}} for (int k = 0; k < argc; ++k) ++k; diff --git a/clang/test/OpenMP/distribute_simd_lastprivate_messages.cpp b/clang/test/OpenMP/distribute_simd_lastprivate_messages.cpp index ec99d9e612a..875210ed49f 100644 --- a/clang/test/OpenMP/distribute_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/distribute_simd_lastprivate_messages.cpp @@ -20,7 +20,7 @@ public: const S2 &operator =(const S2&) const; S2 &operator =(const S2&); static float S2s; // expected-note {{static data member is predetermined as shared}} - static const float S2sc; // expected-note {{static data member is predetermined as shared}} + static const float S2sc; // expected-note {{'S2sc' declared here}} }; const float S2::S2sc = 0; const S2 b; @@ -33,9 +33,9 @@ public: S3() : a(0) {} S3(S3 &s3) : a(s3.a) {} }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note 3 {{implicitly declared private here}} @@ -171,8 +171,8 @@ 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = {0}; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); S3 m; @@ -221,7 +221,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}} expected-error {{incomplete type 'S1' where a complete type is required}} expected-warning {{Non-trivial type 'const S2' is mapped, only trivial types are guaranteed to be mapped correctly}} expected-warning {{Non-trivial type 'const S3' is mapped, only trivial types are guaranteed to be mapped correctly}} +#pragma omp distribute simd lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be lastprivate}} expected-error 2 {{const-qualified variable cannot be lastprivate}} expected-error {{incomplete type 'S1' where a complete type is required}} expected-warning {{Non-trivial type 'const S2' is mapped, only trivial types are guaranteed to be mapped correctly}} expected-warning {{Non-trivial type 'const S3' is mapped, only trivial types are guaranteed to be mapped correctly}} for (i = 0; i < argc; ++i) foo(); #pragma omp target @@ -241,12 +241,12 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}} expected-warning {{Non-trivial type 'const S3 [5]' is mapped, only trivial types are guaranteed to be mapped correctly}} +#pragma omp distribute simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} expected-warning {{Non-trivial type 'const S3 [5]' is mapped, only trivial types are guaranteed to be mapped correctly}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd lastprivate(da) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp distribute simd lastprivate(da) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); int xa; @@ -262,7 +262,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp distribute simd lastprivate(S2::S2sc) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/for_lastprivate_messages.cpp b/clang/test/OpenMP/for_lastprivate_messages.cpp index 7787ab12d48..1777335c9a9 100644 --- a/clang/test/OpenMP/for_lastprivate_messages.cpp +++ b/clang/test/OpenMP/for_lastprivate_messages.cpp @@ -20,7 +20,7 @@ public: const S2 &operator =(const S2&) const; S2 &operator =(const S2&); static float S2s; // expected-note {{static data member is predetermined as shared}} - static const float S2sc; // expected-note {{static data member is predetermined as shared}} + static const float S2sc; // expected-note {{'S2sc' declared here}} }; const float S2::S2sc = 0; const S2 b; @@ -33,9 +33,9 @@ public: S3() : a(0) {} S3(S3 &s3) : a(s3.a) {} }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note 3 {{implicitly declared private here}} @@ -156,8 +156,8 @@ 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = {0}; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); S3 m; @@ -197,7 +197,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp for lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}} +#pragma omp for lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be lastprivate}} expected-error 2 {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel @@ -213,11 +213,11 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp for lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp for lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp for lastprivate(da) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp for lastprivate(da) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); int xa; @@ -230,7 +230,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp for lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp for lastprivate(S2::S2sc) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel diff --git a/clang/test/OpenMP/for_simd_lastprivate_messages.cpp b/clang/test/OpenMP/for_simd_lastprivate_messages.cpp index 9ed2232d6a3..a4bed93365e 100644 --- a/clang/test/OpenMP/for_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/for_simd_lastprivate_messages.cpp @@ -20,7 +20,7 @@ public: S2 &operator =(const S2&); const S2 &operator =(const S2&) const; static float S2s; // expected-note {{static data member is predetermined as shared}} - static const float S2sc; // expected-note {{static data member is predetermined as shared}} + static const float S2sc; // expected-note {{'S2sc' declared here}} }; const float S2::S2sc = 0; const S2 b; @@ -33,9 +33,9 @@ public: S3() : a(0) {} S3(S3 &s3) : a(s3.a) {} }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note 3 {{implicitly declared private here}} @@ -153,8 +153,8 @@ 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = {0}; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); S3 m; @@ -194,7 +194,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp for simd lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}} +#pragma omp for simd lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be lastprivate}} expected-error 2 {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel @@ -210,11 +210,11 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp for simd lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp for simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp for simd lastprivate(da) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp for simd lastprivate(da) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); int xa; @@ -227,7 +227,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp for simd lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp for simd lastprivate(S2::S2sc) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel diff --git a/clang/test/OpenMP/parallel_default_messages.cpp b/clang/test/OpenMP/parallel_default_messages.cpp index 8b1781bdca8..eb4b378f0da 100644 --- a/clang/test/OpenMP/parallel_default_messages.cpp +++ b/clang/test/OpenMP/parallel_default_messages.cpp @@ -1,10 +1,15 @@ // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s - -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-version=50 -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-version=40 -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-version=31 -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-version=30 -fopenmp -ferror-limit 100 -o - %s void foo(); int main(int argc, char **argv) { + const int c = 0; + #pragma omp parallel default // expected-error {{expected '(' after 'default'}} #pragma omp parallel default ( // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp parallel default () // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}} @@ -19,5 +24,8 @@ int main(int argc, char **argv) { #pragma omp parallel default(none) #pragma omp parallel default(shared) ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}} + + #pragma omp parallel default(none) + (void)c; // ge40-error {{variable 'c' must have explicitly specified data sharing attributes}} return 0; } diff --git a/clang/test/OpenMP/parallel_for_lastprivate_messages.cpp b/clang/test/OpenMP/parallel_for_lastprivate_messages.cpp index 8d2f4b5886f..ae635f34217 100644 --- a/clang/test/OpenMP/parallel_for_lastprivate_messages.cpp +++ b/clang/test/OpenMP/parallel_for_lastprivate_messages.cpp @@ -20,7 +20,7 @@ public: S2 &operator=(const S2 &); const S2 &operator=(const S2 &) const; static float S2s; // expected-note {{static data member is predetermined as shared}} - static const float S2sc; // expected-note {{static data member is predetermined as shared}} + static const float S2sc; // expected-note {{'S2sc' declared here}} }; const float S2::S2sc = 0; const S2 b; @@ -33,9 +33,9 @@ public: S3() : a(0) {} S3(S3 &s3) : a(s3.a) {} }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note 3 {{implicitly declared private here}} @@ -136,8 +136,8 @@ 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = {0}; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); S3 m; @@ -168,7 +168,7 @@ int main(int argc, char **argv) { #pragma omp parallel for lastprivate(S1) // expected-error {{'S1' does not refer to a value}} for (i = 0; i < argc; ++i) foo(); -#pragma omp parallel for lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}} +#pragma omp parallel for lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be lastprivate}} expected-error 2 {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for lastprivate(argv[1]) // expected-error {{expected variable name}} @@ -180,10 +180,10 @@ int main(int argc, char **argv) { #pragma omp parallel for lastprivate(ba) for (i = 0; i < argc; ++i) foo(); -#pragma omp parallel for lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp parallel for lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); -#pragma omp parallel for lastprivate(da) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp parallel for lastprivate(da) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); int xa; @@ -193,7 +193,7 @@ int main(int argc, char **argv) { #pragma omp parallel for lastprivate(S2::S2s) // expected-error {{shared variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); -#pragma omp parallel for lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp parallel for lastprivate(S2::S2sc) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for safelen(5) // expected-error {{unexpected OpenMP clause 'safelen' in directive '#pragma omp parallel for'}} diff --git a/clang/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp b/clang/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp index 84e0896f1ff..5759e835b2f 100644 --- a/clang/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp @@ -19,7 +19,7 @@ public: S2(S2 &s2) : a(s2.a) {} const S2 &operator=(const S2 &) const; static float S2s; // expected-note {{static data member is predetermined as shared}} - static const float S2sc; // expected-note {{static data member is predetermined as shared}} + static const float S2sc; // expected-note {{'S2sc' declared here}} }; const float S2::S2sc = 0; const S2 b; @@ -32,9 +32,9 @@ public: S3() : a(0) {} S3(S3 &s3) : a(s3.a) {} }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note 3 {{implicitly declared private here}} @@ -138,8 +138,8 @@ 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = {0}; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); S3 m; @@ -170,7 +170,7 @@ int main(int argc, char **argv) { #pragma omp parallel for simd lastprivate(S1) // expected-error {{'S1' does not refer to a value}} for (i = 0; i < argc; ++i) foo(); -#pragma omp parallel for simd lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}} +#pragma omp parallel for simd lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be lastprivate}} expected-error 2 {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd lastprivate(argv[1]) // expected-error {{expected variable name}} @@ -182,10 +182,10 @@ int main(int argc, char **argv) { #pragma omp parallel for simd lastprivate(ba) for (i = 0; i < argc; ++i) foo(); -#pragma omp parallel for simd lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp parallel for simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); -#pragma omp parallel for simd lastprivate(da) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp parallel for simd lastprivate(da) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); int xa; @@ -195,7 +195,7 @@ int main(int argc, char **argv) { #pragma omp parallel for simd lastprivate(S2::S2s) // expected-error {{shared variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); -#pragma omp parallel for simd lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp parallel for simd lastprivate(S2::S2sc) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd safelen(5) diff --git a/clang/test/OpenMP/parallel_private_messages.cpp b/clang/test/OpenMP/parallel_private_messages.cpp index 4adee55e341..e8fd70d2ff1 100644 --- a/clang/test/OpenMP/parallel_private_messages.cpp +++ b/clang/test/OpenMP/parallel_private_messages.cpp @@ -24,9 +24,9 @@ class S3 { public: S3():a(0) { } }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note {{implicitly declared private here}} @@ -52,8 +52,8 @@ 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = { 0 }; // expected-note {{'da' defined here}} S4 e(4); S5 g[] = {5, 6}; int i; @@ -66,11 +66,11 @@ int main(int argc, char **argv) { #pragma omp parallel private (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} #pragma omp parallel private (argc argv) // expected-error {{expected ',' or ')' in 'private' clause}} #pragma omp parallel private (S1) // expected-error {{'S1' does not refer to a value}} - #pragma omp parallel private (a, b, c, d, f) // expected-error {{a private variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be private}} + #pragma omp parallel private (a, b, c, d, f) // expected-error {{a private variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be private}} expected-error 2 {{const-qualified variable cannot be private}} #pragma omp parallel private (argv[1]) // expected-error {{expected variable name}} #pragma omp parallel private(ba) - #pragma omp parallel private(ca) // expected-error {{shared variable cannot be private}} - #pragma omp parallel private(da) // expected-error {{shared variable cannot be private}} + #pragma omp parallel private(ca) // expected-error {{const-qualified variable without mutable fields cannot be private}} + #pragma omp parallel private(da) // expected-error {{const-qualified variable cannot be private}} #pragma omp parallel private(S2::S2s) // expected-error {{shared variable cannot be private}} #pragma omp parallel private(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}} #pragma omp parallel private(threadvar, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be private}} diff --git a/clang/test/OpenMP/parallel_sections_lastprivate_messages.cpp b/clang/test/OpenMP/parallel_sections_lastprivate_messages.cpp index 865dda01a33..25ea4a51dd9 100644 --- a/clang/test/OpenMP/parallel_sections_lastprivate_messages.cpp +++ b/clang/test/OpenMP/parallel_sections_lastprivate_messages.cpp @@ -19,7 +19,7 @@ public: S2(S2 &s2) : a(s2.a) {} const S2 &operator=(const S2 &) const; static float S2s; // expected-note {{static data member is predetermined as shared}} - static const float S2sc; // expected-note {{static data member is predetermined as shared}} + static const float S2sc; // expected-note {{'S2sc' declared here}} }; const float S2::S2sc = 0; const S2 b; @@ -32,9 +32,9 @@ public: S3() : a(0) {} S3(S3 &s3) : a(s3.a) {} }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note 3 {{implicitly declared private here}} @@ -153,8 +153,8 @@ 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = {0}; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); S3 m; @@ -193,7 +193,7 @@ int main(int argc, char **argv) { { foo(); } -#pragma omp parallel sections lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}} +#pragma omp parallel sections lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be lastprivate}} expected-error 2 {{const-qualified variable cannot be lastprivate}} { foo(); } @@ -209,11 +209,11 @@ int main(int argc, char **argv) { { foo(); } -#pragma omp parallel sections lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp parallel sections lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} { foo(); } -#pragma omp parallel sections lastprivate(da) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp parallel sections lastprivate(da) // expected-error {{const-qualified variable cannot be lastprivate}} { foo(); } @@ -226,7 +226,7 @@ int main(int argc, char **argv) { { foo(); } -#pragma omp parallel sections lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp parallel sections lastprivate(S2::S2sc) // expected-error {{const-qualified variable cannot be lastprivate}} { foo(); } diff --git a/clang/test/OpenMP/sections_lastprivate_messages.cpp b/clang/test/OpenMP/sections_lastprivate_messages.cpp index e24b58fa29b..1f73260541f 100644 --- a/clang/test/OpenMP/sections_lastprivate_messages.cpp +++ b/clang/test/OpenMP/sections_lastprivate_messages.cpp @@ -19,7 +19,7 @@ public: S2(S2 &s2) : a(s2.a) {} const S2 &operator=(const S2 &) const; static float S2s; // expected-note {{static data member is predetermined as shared}} - static const float S2sc; // expected-note {{static data member is predetermined as shared}} + static const float S2sc; // expected-note {{'S2sc' declared here}} }; const float S2::S2sc = 0; const S2 b; @@ -32,9 +32,9 @@ public: S3() : a(0) {} S3(S3 &s3) : a(s3.a) {} }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note 3 {{implicitly declared private here}} @@ -167,8 +167,8 @@ 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = {0}; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); S3 m; @@ -216,7 +216,7 @@ int main(int argc, char **argv) { foo(); } #pragma omp parallel -#pragma omp sections lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}} +#pragma omp sections lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be lastprivate}} expected-error 2 {{const-qualified variable cannot be lastprivate}} { foo(); } @@ -236,12 +236,12 @@ int main(int argc, char **argv) { foo(); } #pragma omp parallel -#pragma omp sections lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp sections lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} { foo(); } #pragma omp parallel -#pragma omp sections lastprivate(da) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp sections lastprivate(da) // expected-error {{const-qualified variable cannot be lastprivate}} { foo(); } @@ -257,7 +257,7 @@ int main(int argc, char **argv) { foo(); } #pragma omp parallel -#pragma omp sections lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp sections lastprivate(S2::S2sc) // expected-error {{const-qualified variable cannot be lastprivate}} { foo(); } diff --git a/clang/test/OpenMP/simd_lastprivate_messages.cpp b/clang/test/OpenMP/simd_lastprivate_messages.cpp index 0af812889cf..bd5a237a602 100644 --- a/clang/test/OpenMP/simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/simd_lastprivate_messages.cpp @@ -19,7 +19,7 @@ public: S2(S2 &s2) : a(s2.a) {} const S2 &operator=(const S2 &) const; static float S2s; // expected-note {{static data member is predetermined as shared}} - static const float S2sc; // expected-note {{static data member is predetermined as shared}} + static const float S2sc; // expected-note {{'S2sc' declared here}} }; const float S2::S2sc = 0; const S2 b; @@ -32,9 +32,9 @@ public: S3() : a(0) {} S3(S3 &s3) : a(s3.a) {} }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note {{implicitly declared private here}} @@ -130,8 +130,8 @@ int foomain(I argc, C **argv) { } 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = {0}; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); S3 m; @@ -161,7 +161,7 @@ int main(int argc, char **argv) { #pragma omp simd lastprivate(S1) // expected-error {{'S1' does not refer to a value}} for (i = 0; i < argc; ++i) foo(); -#pragma omp simd lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}} +#pragma omp simd lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be lastprivate}} expected-error 2 {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp simd lastprivate(argv[1]) // expected-error {{expected variable name}} @@ -173,10 +173,10 @@ int main(int argc, char **argv) { #pragma omp simd lastprivate(ba) for (i = 0; i < argc; ++i) foo(); -#pragma omp simd lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); -#pragma omp simd lastprivate(da) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp simd lastprivate(da) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); int xa; @@ -186,7 +186,7 @@ int main(int argc, char **argv) { #pragma omp simd lastprivate(S2::S2s) // expected-error {{shared variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); -#pragma omp simd lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp simd lastprivate(S2::S2sc) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp simd firstprivate(g) // expected-error {{unexpected OpenMP clause 'firstprivate' in directive '#pragma omp simd'}} diff --git a/clang/test/OpenMP/target_parallel_for_lastprivate_messages.cpp b/clang/test/OpenMP/target_parallel_for_lastprivate_messages.cpp index 0ff2c722f7d..7aff164b50b 100644 --- a/clang/test/OpenMP/target_parallel_for_lastprivate_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_lastprivate_messages.cpp @@ -20,7 +20,7 @@ public: S2 &operator=(const S2 &); const S2 &operator=(const S2 &) const; static float S2s; // expected-note {{static data member is predetermined as shared}} - static const float S2sc; // expected-note {{static data member is predetermined as shared}} + static const float S2sc; // expected-note {{'S2sc' declared here}} }; const float S2::S2sc = 0; const S2 b; @@ -33,9 +33,9 @@ public: S3() : a(0) {} S3(S3 &s3) : a(s3.a) {} }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note 3 {{implicitly declared private here}} @@ -136,8 +136,8 @@ 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = {0}; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); S3 m; @@ -168,7 +168,7 @@ int main(int argc, char **argv) { #pragma omp target parallel for lastprivate(S1) // expected-error {{'S1' does not refer to a value}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target parallel for lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}} +#pragma omp target parallel for lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be lastprivate}} expected-error 2 {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for lastprivate(argv[1]) // expected-error {{expected variable name}} @@ -180,10 +180,10 @@ int main(int argc, char **argv) { #pragma omp target parallel for lastprivate(ba) for (i = 0; i < argc; ++i) foo(); -#pragma omp target parallel for lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp target parallel for lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target parallel for lastprivate(da) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp target parallel for lastprivate(da) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); int xa; @@ -193,7 +193,7 @@ int main(int argc, char **argv) { #pragma omp target parallel for lastprivate(S2::S2s) // expected-error {{shared variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target parallel for lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp target parallel for lastprivate(S2::S2sc) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for safelen(5) // expected-error {{unexpected OpenMP clause 'safelen' in directive '#pragma omp target parallel for'}} diff --git a/clang/test/OpenMP/target_parallel_for_simd_lastprivate_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_lastprivate_messages.cpp index 7c2c23f9d70..1c4d853431a 100644 --- a/clang/test/OpenMP/target_parallel_for_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/target_parallel_for_simd_lastprivate_messages.cpp @@ -20,7 +20,7 @@ public: S2 &operator=(const S2 &); const S2 &operator=(const S2 &) const; static float S2s; // expected-note {{static data member is predetermined as shared}} - static const float S2sc; // expected-note {{static data member is predetermined as shared}} + static const float S2sc; // expected-note {{'S2sc' declared here}} }; const float S2::S2sc = 0; const S2 b; @@ -33,9 +33,9 @@ public: S3() : a(0) {} S3(S3 &s3) : a(s3.a) {} }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note 3 {{implicitly declared private here}} @@ -136,8 +136,8 @@ 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = {0}; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); S3 m; @@ -168,7 +168,7 @@ int main(int argc, char **argv) { #pragma omp target parallel for simd lastprivate(S1) // expected-error {{'S1' does not refer to a value}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target parallel for simd lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}} +#pragma omp target parallel for simd lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be lastprivate}} expected-error 2 {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd lastprivate(argv[1]) // expected-error {{expected variable name}} @@ -180,10 +180,10 @@ int main(int argc, char **argv) { #pragma omp target parallel for simd lastprivate(ba) for (i = 0; i < argc; ++i) foo(); -#pragma omp target parallel for simd lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp target parallel for simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target parallel for simd lastprivate(da) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp target parallel for simd lastprivate(da) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); int xa; @@ -193,7 +193,7 @@ int main(int argc, char **argv) { #pragma omp target parallel for simd lastprivate(S2::S2s) // expected-error {{shared variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target parallel for simd lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp target parallel for simd lastprivate(S2::S2sc) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd safelen(5) // OK diff --git a/clang/test/OpenMP/target_parallel_private_messages.cpp b/clang/test/OpenMP/target_parallel_private_messages.cpp index 34652d6cb3c..de71c03ad4b 100644 --- a/clang/test/OpenMP/target_parallel_private_messages.cpp +++ b/clang/test/OpenMP/target_parallel_private_messages.cpp @@ -22,9 +22,9 @@ class S3 { public: S3() : a(0) {} }; -const S3 c; // expected-note {{global variable is predetermined as shared}} expected-note 1 {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} expected-note 1 {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} expected-note 1 {{global variable is predetermined as shared}} +const S3 c; // expected-note 2 {{'c' defined here}} +const S3 ca[5]; // expected-note 2 {{'ca' defined here}} +extern const int f; // expected-note 2 {{'f' declared here}} int threadvar; #pragma omp threadprivate(threadvar) // expected-note {{defined as threadprivate or thread local}} expected-note 1 {{defined as threadprivate or thread local}} @@ -56,8 +56,8 @@ S3 h; template <class I, class C, class D, class E> int foomain(I argc, C **argv) { - const I d = 5; // expected-note {{constant variable is predetermined as shared}} - const I da[5] = { 0 }; // expected-note {{constant variable is predetermined as shared}} + const I d = 5; // expected-note {{'d' defined here}} + const I da[5] = { 0 }; // expected-note {{'da' defined here}} D e(4); E g[] = {5, 6}; I i; @@ -82,15 +82,15 @@ int foomain(I argc, C **argv) { {} #pragma omp target parallel private(a, b) // expected-error {{private variable with incomplete type 'S1'}} {} -#pragma omp target parallel private (a, b, c, d, f) // expected-error {{a private variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be private}} +#pragma omp target parallel private (a, b, c, d, f) // expected-error {{a private variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be private}} expected-error 2 {{const-qualified variable cannot be private}} {} #pragma omp target parallel private(argv[1]) // expected-error {{expected variable name}} {} #pragma omp target parallel private(ba) {} -#pragma omp target parallel private(ca) // expected-error {{shared variable cannot be private}} +#pragma omp target parallel private(ca) // expected-error {{const-qualified variable without mutable fields cannot be private}} {} -#pragma omp target parallel private(da) // expected-error {{shared variable cannot be private}} +#pragma omp target parallel private(da) // expected-error {{const-qualified variable cannot be private}} {} #pragma omp target parallel private(S2::S2s) // expected-error {{shared variable cannot be private}} {} @@ -143,8 +143,8 @@ void bar(S4 a[2]) { } 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = { 0 }; // expected-note {{'da' defined here}} S4 e(4); S5 g[] = {5, 6}; int i; @@ -169,15 +169,15 @@ int main(int argc, char **argv) { {} #pragma omp target parallel private(a, b) // expected-error {{private variable with incomplete type 'S1'}} {} -#pragma omp target parallel private (a, b, c, d, f) // expected-error {{a private variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be private}} +#pragma omp target parallel private (a, b, c, d, f) // expected-error {{a private variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be private}} expected-error 2 {{const-qualified variable cannot be private}} {} #pragma omp target parallel private(argv[1]) // expected-error {{expected variable name}} {} #pragma omp target parallel private(ba) {} -#pragma omp target parallel private(ca) // expected-error {{shared variable cannot be private}} +#pragma omp target parallel private(ca) // expected-error {{const-qualified variable without mutable fields cannot be private}} {} -#pragma omp target parallel private(da) // expected-error {{shared variable cannot be private}} +#pragma omp target parallel private(da) // expected-error {{const-qualified variable cannot be private}} {} #pragma omp target parallel private(S2::S2s) // expected-error {{shared variable cannot be private}} {} diff --git a/clang/test/OpenMP/target_simd_lastprivate_messages.cpp b/clang/test/OpenMP/target_simd_lastprivate_messages.cpp index ae8bd0af7b5..70a452f6a50 100644 --- a/clang/test/OpenMP/target_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/target_simd_lastprivate_messages.cpp @@ -20,7 +20,7 @@ public: S2 &operator=(const S2 &); const S2 &operator=(const S2 &) const; static float S2s; // expected-note {{static data member is predetermined as shared}} - static const float S2sc; // expected-note {{static data member is predetermined as shared}} + static const float S2sc; // expected-note {{'S2sc' declared here}} }; const float S2::S2sc = 0; const S2 b; @@ -33,9 +33,9 @@ public: S3() : a(0) {} S3(S3 &s3) : a(s3.a) {} }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note 3 {{implicitly declared private here}} @@ -136,8 +136,8 @@ 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = {0}; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); S3 m; @@ -168,7 +168,7 @@ int main(int argc, char **argv) { #pragma omp target simd lastprivate(S1) // expected-error {{'S1' does not refer to a value}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target simd lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}} +#pragma omp target simd lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be lastprivate}} expected-error 2 {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target simd lastprivate(argv[1]) // expected-error {{expected variable name}} @@ -180,10 +180,10 @@ int main(int argc, char **argv) { #pragma omp target simd lastprivate(ba) for (i = 0; i < argc; ++i) foo(); -#pragma omp target simd lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp target simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target simd lastprivate(da) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp target simd lastprivate(da) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); int xa; @@ -193,7 +193,7 @@ int main(int argc, char **argv) { #pragma omp target simd lastprivate(S2::S2s) // expected-error {{shared variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target simd lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp target simd lastprivate(S2::S2sc) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target simd safelen(5) // OK diff --git a/clang/test/OpenMP/target_teams_distribute_lastprivate_messages.cpp b/clang/test/OpenMP/target_teams_distribute_lastprivate_messages.cpp index 0739846cee0..0a2f5448ba0 100644 --- a/clang/test/OpenMP/target_teams_distribute_lastprivate_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_lastprivate_messages.cpp @@ -20,7 +20,7 @@ public: const S2 &operator =(const S2&) const; S2 &operator =(const S2&); static float S2s; // expected-note {{static data member is predetermined as shared}} - static const float S2sc; // expected-note {{static data member is predetermined as shared}} + static const float S2sc; // expected-note {{'S2sc' declared here}} }; const float S2::S2sc = 0; const S2 b; @@ -33,9 +33,9 @@ public: S3() : a(0) {} S3(S3 &s3) : a(s3.a) {} }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note 3 {{implicitly declared private here}} @@ -136,8 +136,8 @@ 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = {0}; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); S3 m; @@ -168,7 +168,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute lastprivate(S1) // expected-error {{'S1' does not refer to a value}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}} +#pragma omp target teams distribute lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be lastprivate}} expected-error 2 {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute lastprivate(argv[1]) // expected-error {{expected variable name}} @@ -180,10 +180,10 @@ int main(int argc, char **argv) { #pragma omp target teams distribute lastprivate(ba) for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp target teams distribute lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute lastprivate(da) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp target teams distribute lastprivate(da) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); int xa; @@ -193,7 +193,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute lastprivate(S2::S2s) // expected-error {{shared variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp target teams distribute lastprivate(S2::S2sc) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute lastprivate(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}} diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp index b21b9118f91..3c5e8152177 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp @@ -20,7 +20,7 @@ public: const S2 &operator =(const S2&) const; S2 &operator =(const S2&); static float S2s; // expected-note {{static data member is predetermined as shared}} - static const float S2sc; // expected-note {{static data member is predetermined as shared}} + static const float S2sc; // expected-note {{'S2sc' declared here}} }; const float S2::S2sc = 0; const S2 b; @@ -33,9 +33,9 @@ public: S3() : a(0) {} S3(S3 &s3) : a(s3.a) {} }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note 3 {{implicitly declared private here}} @@ -136,8 +136,8 @@ 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = {0}; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); S3 m; @@ -169,7 +169,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for lastprivate(S1) // expected-error {{'S1' does not refer to a value}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}} +#pragma omp target teams distribute parallel for lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be lastprivate}} expected-error 2 {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for lastprivate(argv[1]) // expected-error {{expected variable name}} @@ -181,10 +181,10 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for lastprivate(ba) for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp target teams distribute parallel for lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for lastprivate(da) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp target teams distribute parallel for lastprivate(da) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); int xa; @@ -194,7 +194,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for lastprivate(S2::S2s) // expected-error {{shared variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp target teams distribute parallel for lastprivate(S2::S2sc) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for lastprivate(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}} diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_private_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_private_messages.cpp index 7750238e70b..43b0304bb90 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_private_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_private_messages.cpp @@ -24,9 +24,9 @@ class S3 { public: S3():a(0) { } }; -const S3 c; // expected-note {{predetermined as shared}} -const S3 ca[5]; // expected-note {{predetermined as shared}} -extern const int f; // expected-note {{predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note {{implicitly declared private here}} @@ -45,8 +45,8 @@ S3 h; int main(int argc, char **argv) { - const int d = 5; // expected-note {{predetermined as shared}} - const int da[5] = { 0 }; // expected-note {{predetermined as shared}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = { 0 }; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); int i; @@ -76,7 +76,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for private (S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target teams distribute parallel for private (a, b, c, d, f) // expected-error {{private variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be private}} +#pragma omp target teams distribute parallel for private (a, b, c, d, f) // expected-error {{private variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be private}} expected-error 2 {{const-qualified variable cannot be private}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target teams distribute parallel for private (argv[1]) // expected-error {{expected variable name}} @@ -85,10 +85,10 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for private(ba) for (int k = 0; k < argc; ++k) ++k; -#pragma omp target teams distribute parallel for private(ca) // expected-error {{shared variable cannot be private}} +#pragma omp target teams distribute parallel for private(ca) // expected-error {{const-qualified variable without mutable fields cannot be private}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target teams distribute parallel for private(da) // expected-error {{shared variable cannot be private}} +#pragma omp target teams distribute parallel for private(da) // expected-error {{const-qualified variable cannot be private}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target teams distribute parallel for private(S2::S2s) // expected-error {{shared variable cannot be private}} diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_messages.cpp index b65c22ba8a4..d1adbd0d391 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_messages.cpp @@ -20,7 +20,7 @@ public: const S2 &operator =(const S2&) const; S2 &operator =(const S2&); static float S2s; // expected-note {{static data member is predetermined as shared}} - static const float S2sc; // expected-note {{static data member is predetermined as shared}} + static const float S2sc; // expected-note {{'S2sc' declared here}} }; const float S2::S2sc = 0; const S2 b; @@ -33,9 +33,9 @@ public: S3() : a(0) {} S3(S3 &s3) : a(s3.a) {} }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note 3 {{implicitly declared private here}} @@ -136,8 +136,8 @@ 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = {0}; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); S3 m; @@ -169,7 +169,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for simd lastprivate(S1) // expected-error {{'S1' does not refer to a value}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for simd lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}} +#pragma omp target teams distribute parallel for simd lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be lastprivate}} expected-error 2 {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd lastprivate(argv[1]) // expected-error {{expected variable name}} @@ -181,10 +181,10 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for simd lastprivate(ba) for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for simd lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp target teams distribute parallel for simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for simd lastprivate(da) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp target teams distribute parallel for simd lastprivate(da) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); int xa; @@ -194,7 +194,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for simd lastprivate(S2::S2s) // expected-error {{shared variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for simd lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp target teams distribute parallel for simd lastprivate(S2::S2sc) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd lastprivate(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}} diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_private_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_private_messages.cpp index f1a8e0bfc7c..9cf810a9e95 100644 --- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_private_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_private_messages.cpp @@ -24,9 +24,9 @@ class S3 { public: S3():a(0) { } }; -const S3 c; // expected-note {{predetermined as shared}} -const S3 ca[5]; // expected-note {{predetermined as shared}} -extern const int f; // expected-note {{predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note {{implicitly declared private here}} @@ -45,8 +45,8 @@ S3 h; int main(int argc, char **argv) { - const int d = 5; // expected-note {{predetermined as shared}} - const int da[5] = { 0 }; // expected-note {{predetermined as shared}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = { 0 }; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); int i; @@ -76,7 +76,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for simd private (S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; - #pragma omp target teams distribute parallel for simd private (a, b, c, d, f) // expected-error {{private variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be private}} + #pragma omp target teams distribute parallel for simd private (a, b, c, d, f) // expected-error {{private variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be private}} expected-error 2 {{const-qualified variable cannot be private}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target teams distribute parallel for simd private (argv[1]) // expected-error {{expected variable name}} @@ -85,10 +85,10 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for simd private(ba) for (int k = 0; k < argc; ++k) ++k; - #pragma omp target teams distribute parallel for simd private(ca) // expected-error {{shared variable cannot be private}} + #pragma omp target teams distribute parallel for simd private(ca) // expected-error {{const-qualified variable without mutable fields cannot be private}} for (int k = 0; k < argc; ++k) ++k; - #pragma omp target teams distribute parallel for simd private(da) // expected-error {{shared variable cannot be private}} + #pragma omp target teams distribute parallel for simd private(da) // expected-error {{const-qualified variable cannot be private}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target teams distribute parallel for simd private(S2::S2s) // expected-error {{shared variable cannot be private}} diff --git a/clang/test/OpenMP/target_teams_distribute_private_messages.cpp b/clang/test/OpenMP/target_teams_distribute_private_messages.cpp index df7b68919ca..3d692a3f262 100644 --- a/clang/test/OpenMP/target_teams_distribute_private_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_private_messages.cpp @@ -24,9 +24,9 @@ class S3 { public: S3():a(0) { } }; -const S3 c; // expected-note {{predetermined as shared}} -const S3 ca[5]; // expected-note {{predetermined as shared}} -extern const int f; // expected-note {{predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note {{implicitly declared private here}} @@ -45,8 +45,8 @@ S3 h; int main(int argc, char **argv) { - const int d = 5; // expected-note {{predetermined as shared}} - const int da[5] = { 0 }; // expected-note {{predetermined as shared}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = { 0 }; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); int i; @@ -76,7 +76,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute private (S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target teams distribute private (a, b, c, d, f) // expected-error {{private variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be private}} +#pragma omp target teams distribute private (a, b, c, d, f) // expected-error {{private variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be private}} expected-error 2 {{const-qualified variable cannot be private}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target teams distribute private (argv[1]) // expected-error {{expected variable name}} @@ -85,10 +85,10 @@ int main(int argc, char **argv) { #pragma omp target teams distribute private(ba) for (int k = 0; k < argc; ++k) ++k; -#pragma omp target teams distribute private(ca) // expected-error {{shared variable cannot be private}} +#pragma omp target teams distribute private(ca) // expected-error {{const-qualified variable without mutable fields cannot be private}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target teams distribute private(da) // expected-error {{shared variable cannot be private}} +#pragma omp target teams distribute private(da) // expected-error {{const-qualified variable cannot be private}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target teams distribute private(S2::S2s) // expected-error {{shared variable cannot be private}} diff --git a/clang/test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp index 3a9abfb24a1..4dcc9ea7549 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp @@ -20,7 +20,7 @@ public: const S2 &operator =(const S2&) const; S2 &operator =(const S2&); static float S2s; // expected-note {{static data member is predetermined as shared}} - static const float S2sc; // expected-note {{static data member is predetermined as shared}} + static const float S2sc; // expected-note {{'S2sc' declared here}} }; const float S2::S2sc = 0; const S2 b; @@ -33,9 +33,9 @@ public: S3() : a(0) {} S3(S3 &s3) : a(s3.a) {} }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note 3 {{implicitly declared private here}} @@ -136,8 +136,8 @@ 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = {0}; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); S3 m; @@ -169,7 +169,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute simd lastprivate(S1) // expected-error {{'S1' does not refer to a value}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute simd lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}} +#pragma omp target teams distribute simd lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be lastprivate}} expected-error 2 {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd lastprivate(argv[1]) // expected-error {{expected variable name}} @@ -181,10 +181,10 @@ int main(int argc, char **argv) { #pragma omp target teams distribute simd lastprivate(ba) for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute simd lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp target teams distribute simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute simd lastprivate(da) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp target teams distribute simd lastprivate(da) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); int xa; @@ -194,7 +194,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute simd lastprivate(S2::S2s) // expected-error {{shared variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute simd lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp target teams distribute simd lastprivate(S2::S2sc) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd lastprivate(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}} diff --git a/clang/test/OpenMP/target_teams_distribute_simd_private_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_private_messages.cpp index 743ac160ce5..eef86d229d3 100644 --- a/clang/test/OpenMP/target_teams_distribute_simd_private_messages.cpp +++ b/clang/test/OpenMP/target_teams_distribute_simd_private_messages.cpp @@ -24,9 +24,9 @@ class S3 { public: S3():a(0) { } }; -const S3 c; // expected-note {{predetermined as shared}} -const S3 ca[5]; // expected-note {{predetermined as shared}} -extern const int f; // expected-note {{predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note {{implicitly declared private here}} @@ -45,8 +45,8 @@ S3 h; int main(int argc, char **argv) { - const int d = 5; // expected-note {{predetermined as shared}} - const int da[5] = { 0 }; // expected-note {{predetermined as shared}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = { 0 }; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); int i; @@ -76,7 +76,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute simd private (S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target teams distribute simd private (a, b, c, d, f) // expected-error {{private variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be private}} +#pragma omp target teams distribute simd private (a, b, c, d, f) // expected-error {{private variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be private}} expected-error 2 {{const-qualified variable cannot be private}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target teams distribute simd private (argv[1]) // expected-error {{expected variable name}} @@ -85,10 +85,10 @@ int main(int argc, char **argv) { #pragma omp target teams distribute simd private(ba) for (int k = 0; k < argc; ++k) ++k; -#pragma omp target teams distribute simd private(ca) // expected-error {{shared variable cannot be private}} +#pragma omp target teams distribute simd private(ca) // expected-error {{const-qualified variable without mutable fields cannot be private}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target teams distribute simd private(da) // expected-error {{shared variable cannot be private}} +#pragma omp target teams distribute simd private(da) // expected-error {{const-qualified variable cannot be private}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target teams distribute simd private(S2::S2s) // expected-error {{shared variable cannot be private}} diff --git a/clang/test/OpenMP/target_teams_private_messages.cpp b/clang/test/OpenMP/target_teams_private_messages.cpp index 7ee509c8aca..ceb268f40a7 100644 --- a/clang/test/OpenMP/target_teams_private_messages.cpp +++ b/clang/test/OpenMP/target_teams_private_messages.cpp @@ -24,9 +24,9 @@ class S3 { public: S3():a(0) { } }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note {{implicitly declared private here}} @@ -52,8 +52,8 @@ 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = { 0 }; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); int i; @@ -74,15 +74,15 @@ int main(int argc, char **argv) { foo(); #pragma omp target teams private (S1) // expected-error {{'S1' does not refer to a value}} foo(); -#pragma omp target teams private (a, b, c, d, f) // expected-error {{a private variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be private}} +#pragma omp target teams private (a, b, c, d, f) // expected-error {{a private variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be private}} expected-error 2 {{const-qualified variable cannot be private}} foo(); #pragma omp target teams private (argv[1]) // expected-error {{expected variable name}} foo(); #pragma omp target teams private(ba) foo(); -#pragma omp target teams private(ca) // expected-error {{shared variable cannot be private}} +#pragma omp target teams private(ca) // expected-error {{const-qualified variable without mutable fields cannot be private}} foo(); -#pragma omp target teams private(da) // expected-error {{shared variable cannot be private}} +#pragma omp target teams private(da) // expected-error {{const-qualified variable cannot be private}} foo(); #pragma omp target teams private(S2::S2s) // expected-error {{shared variable cannot be private}} foo(); diff --git a/clang/test/OpenMP/task_private_messages.cpp b/clang/test/OpenMP/task_private_messages.cpp index 5663a436e43..2a3df509c25 100644 --- a/clang/test/OpenMP/task_private_messages.cpp +++ b/clang/test/OpenMP/task_private_messages.cpp @@ -26,9 +26,9 @@ class S3 { public: S3() : a(0) {} }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note {{implicitly declared private here}} @@ -61,8 +61,8 @@ 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = {0}; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); int i; @@ -75,11 +75,11 @@ int main(int argc, char **argv) { #pragma omp task private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} #pragma omp task private(argc argv) // expected-error {{expected ',' or ')' in 'private' clause}} #pragma omp task private(S1) // expected-error {{'S1' does not refer to a value}} -#pragma omp task private(a, b, c, d, f) // expected-error {{a private variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be private}} +#pragma omp task private(a, b, c, d, f) // expected-error {{a private variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be private}} expected-error 2 {{const-qualified variable cannot be private}} #pragma omp task private(argv[1]) // expected-error {{expected variable name}} #pragma omp task private(ba) -#pragma omp task private(ca) // expected-error {{shared variable cannot be private}} -#pragma omp task private(da) // expected-error {{shared variable cannot be private}} +#pragma omp task private(ca) // expected-error {{const-qualified variable without mutable fields cannot be private}} +#pragma omp task private(da) // expected-error {{const-qualified variable cannot be private}} #pragma omp task private(S2::S2s) // expected-error {{shared variable cannot be private}} #pragma omp task private(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}} #pragma omp task private(threadvar, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be private}} diff --git a/clang/test/OpenMP/taskloop_lastprivate_messages.cpp b/clang/test/OpenMP/taskloop_lastprivate_messages.cpp index 85aaa00c818..c46a1f0c4c1 100644 --- a/clang/test/OpenMP/taskloop_lastprivate_messages.cpp +++ b/clang/test/OpenMP/taskloop_lastprivate_messages.cpp @@ -20,7 +20,7 @@ public: const S2 &operator =(const S2&) const; S2 &operator =(const S2&); static float S2s; // expected-note {{static data member is predetermined as shared}} - static const float S2sc; // expected-note {{static data member is predetermined as shared}} + static const float S2sc; // expected-note {{'S2sc' declared here}} }; const float S2::S2sc = 0; const S2 b; @@ -33,9 +33,9 @@ public: S3() : a(0) {} S3(S3 &s3) : a(s3.a) {} }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note 3 {{implicitly declared private here}} @@ -156,8 +156,8 @@ 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = {0}; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); S3 m; @@ -197,7 +197,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp taskloop lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}} +#pragma omp taskloop lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be lastprivate}} expected-error 2 {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel @@ -213,11 +213,11 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp taskloop lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp taskloop lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp taskloop lastprivate(da) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp taskloop lastprivate(da) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); int xa; @@ -230,7 +230,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp taskloop lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp taskloop lastprivate(S2::S2sc) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel diff --git a/clang/test/OpenMP/taskloop_simd_lastprivate_messages.cpp b/clang/test/OpenMP/taskloop_simd_lastprivate_messages.cpp index 8f418ff3b88..3ed65de247e 100644 --- a/clang/test/OpenMP/taskloop_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/taskloop_simd_lastprivate_messages.cpp @@ -20,7 +20,7 @@ public: const S2 &operator =(const S2&) const; S2 &operator =(const S2&); static float S2s; // expected-note {{static data member is predetermined as shared}} - static const float S2sc; // expected-note {{static data member is predetermined as shared}} + static const float S2sc; // expected-note {{'S2sc' declared here}} }; const float S2::S2sc = 0; const S2 b; @@ -33,9 +33,9 @@ public: S3() : a(0) {} S3(S3 &s3) : a(s3.a) {} }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note 3 {{implicitly declared private here}} @@ -156,8 +156,8 @@ 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = {0}; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); S3 m; @@ -197,7 +197,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp taskloop simd lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}} +#pragma omp taskloop simd lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be lastprivate}} expected-error 2 {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel @@ -213,11 +213,11 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp taskloop simd lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp taskloop simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp taskloop simd lastprivate(da) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp taskloop simd lastprivate(da) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); int xa; @@ -230,7 +230,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp taskloop simd lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp taskloop simd lastprivate(S2::S2sc) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel diff --git a/clang/test/OpenMP/teams_distribute_lastprivate_messages.cpp b/clang/test/OpenMP/teams_distribute_lastprivate_messages.cpp index d5e1a1c94cd..a6440b7b6d9 100644 --- a/clang/test/OpenMP/teams_distribute_lastprivate_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_lastprivate_messages.cpp @@ -20,7 +20,7 @@ public: const S2 &operator =(const S2&) const; S2 &operator =(const S2&); static float S2s; // expected-note {{static data member is predetermined as shared}} - static const float S2sc; // expected-note {{static data member is predetermined as shared}} + static const float S2sc; // expected-note {{'S2sc' declared here}} }; const float S2::S2sc = 0; const S2 b; @@ -33,9 +33,9 @@ public: S3() : a(0) {} S3(S3 &s3) : a(s3.a) {} }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note 3 {{implicitly declared private here}} @@ -152,8 +152,8 @@ 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = {0}; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); S3 m; @@ -193,7 +193,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}} +#pragma omp teams distribute lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be lastprivate}} expected-error 2 {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target @@ -209,11 +209,11 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp teams distribute lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute lastprivate(da) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp teams distribute lastprivate(da) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); int xa; @@ -226,7 +226,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp teams distribute lastprivate(S2::S2sc) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp index 97e9e4f822f..14b7e8be2a2 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp @@ -20,7 +20,7 @@ public: const S2 &operator =(const S2&) const; S2 &operator =(const S2&); static float S2s; // expected-note {{static data member is predetermined as shared}} - static const float S2sc; // expected-note {{static data member is predetermined as shared}} + static const float S2sc; // expected-note {{'S2sc' declared here}} }; const float S2::S2sc = 0; const S2 b; @@ -33,9 +33,9 @@ public: S3() : a(0) {} S3(S3 &s3) : a(s3.a) {} }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note 3 {{implicitly declared private here}} @@ -152,8 +152,8 @@ 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = {0}; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); S3 m; @@ -193,7 +193,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}} +#pragma omp teams distribute parallel for lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be lastprivate}} expected-error 2 {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target @@ -209,11 +209,11 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp teams distribute parallel for lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for lastprivate(da) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp teams distribute parallel for lastprivate(da) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); int xa; @@ -226,7 +226,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp teams distribute parallel for lastprivate(S2::S2sc) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_private_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_private_messages.cpp index 5fda1a96e41..ba9e0774371 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_private_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_private_messages.cpp @@ -24,9 +24,9 @@ class S3 { public: S3():a(0) { } }; -const S3 c; // expected-note {{predetermined as shared}} -const S3 ca[5]; // expected-note {{predetermined as shared}} -extern const int f; // expected-note {{predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note {{implicitly declared private here}} @@ -45,8 +45,8 @@ S3 h; int main(int argc, char **argv) { - const int d = 5; // expected-note {{predetermined as shared}} - const int da[5] = { 0 }; // expected-note {{predetermined as shared}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = { 0 }; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); int i; @@ -85,7 +85,7 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp target - #pragma omp teams distribute parallel for private (a, b, c, d, f) // expected-error {{private variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be private}} + #pragma omp teams distribute parallel for private (a, b, c, d, f) // expected-error {{private variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be private}} expected-error 2 {{const-qualified variable cannot be private}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target @@ -97,11 +97,11 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp target - #pragma omp teams distribute parallel for private(ca) // expected-error {{shared variable cannot be private}} + #pragma omp teams distribute parallel for private(ca) // expected-error {{const-qualified variable without mutable fields cannot be private}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target - #pragma omp teams distribute parallel for private(da) // expected-error {{shared variable cannot be private}} + #pragma omp teams distribute parallel for private(da) // expected-error {{const-qualified variable cannot be private}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp index 416d409acc1..7e78d06e937 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp @@ -20,7 +20,7 @@ public: const S2 &operator =(const S2&) const; S2 &operator =(const S2&); static float S2s; // expected-note {{static data member is predetermined as shared}} - static const float S2sc; // expected-note {{static data member is predetermined as shared}} + static const float S2sc; // expected-note {{'S2sc' declared here}} }; const float S2::S2sc = 0; const S2 b; @@ -33,9 +33,9 @@ public: S3() : a(0) {} S3(S3 &s3) : a(s3.a) {} }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note 3 {{implicitly declared private here}} @@ -152,8 +152,8 @@ 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = {0}; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); S3 m; @@ -193,7 +193,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}} +#pragma omp teams distribute parallel for simd lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be lastprivate}} expected-error 2 {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target @@ -209,11 +209,11 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp teams distribute parallel for simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd lastprivate(da) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp teams distribute parallel for simd lastprivate(da) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); int xa; @@ -226,7 +226,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp teams distribute parallel for simd lastprivate(S2::S2sc) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_private_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_private_messages.cpp index 50bf034891d..7bbe4c2f235 100644 --- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_private_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_private_messages.cpp @@ -24,9 +24,9 @@ class S3 { public: S3():a(0) { } }; -const S3 c; // expected-note {{predetermined as shared}} -const S3 ca[5]; // expected-note {{predetermined as shared}} -extern const int f; // expected-note {{predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note {{implicitly declared private here}} @@ -45,8 +45,8 @@ S3 h; int main(int argc, char **argv) { - const int d = 5; // expected-note {{predetermined as shared}} - const int da[5] = { 0 }; // expected-note {{predetermined as shared}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = { 0 }; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); int i; @@ -85,7 +85,7 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp target - #pragma omp teams distribute parallel for simd private (a, b, c, d, f) // expected-error {{private variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be private}} + #pragma omp teams distribute parallel for simd private (a, b, c, d, f) // expected-error {{private variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be private}} expected-error 2 {{const-qualified variable cannot be private}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target @@ -97,11 +97,11 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp target - #pragma omp teams distribute parallel for simd private(ca) // expected-error {{shared variable cannot be private}} + #pragma omp teams distribute parallel for simd private(ca) // expected-error {{const-qualified variable without mutable fields cannot be private}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target - #pragma omp teams distribute parallel for simd private(da) // expected-error {{shared variable cannot be private}} + #pragma omp teams distribute parallel for simd private(da) // expected-error {{const-qualified variable cannot be private}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target diff --git a/clang/test/OpenMP/teams_distribute_private_messages.cpp b/clang/test/OpenMP/teams_distribute_private_messages.cpp index 5fa002aadaa..c24504460ef 100644 --- a/clang/test/OpenMP/teams_distribute_private_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_private_messages.cpp @@ -24,9 +24,9 @@ class S3 { public: S3():a(0) { } }; -const S3 c; // expected-note {{predetermined as shared}} -const S3 ca[5]; // expected-note {{predetermined as shared}} -extern const int f; // expected-note {{predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note {{implicitly declared private here}} @@ -45,8 +45,8 @@ S3 h; int main(int argc, char **argv) { - const int d = 5; // expected-note {{predetermined as shared}} - const int da[5] = { 0 }; // expected-note {{predetermined as shared}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = { 0 }; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); int i; @@ -85,7 +85,7 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp target - #pragma omp teams distribute private (a, b, c, d, f) // expected-error {{private variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be private}} + #pragma omp teams distribute private (a, b, c, d, f) // expected-error {{private variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be private}} expected-error 2 {{const-qualified variable cannot be private}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target @@ -97,11 +97,11 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp target - #pragma omp teams distribute private(ca) // expected-error {{shared variable cannot be private}} + #pragma omp teams distribute private(ca) // expected-error {{const-qualified variable without mutable fields cannot be private}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target - #pragma omp teams distribute private(da) // expected-error {{shared variable cannot be private}} + #pragma omp teams distribute private(da) // expected-error {{const-qualified variable cannot be private}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target diff --git a/clang/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp index 08605912d8e..5e0806b6870 100644 --- a/clang/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp @@ -20,7 +20,7 @@ public: const S2 &operator =(const S2&) const; S2 &operator =(const S2&); static float S2s; // expected-note {{static data member is predetermined as shared}} - static const float S2sc; // expected-note {{static data member is predetermined as shared}} + static const float S2sc; // expected-note {{'S2sc' declared here}} }; const float S2::S2sc = 0; const S2 b; @@ -33,9 +33,9 @@ public: S3() : a(0) {} S3(S3 &s3) : a(s3.a) {} }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note 3 {{implicitly declared private here}} @@ -152,8 +152,8 @@ 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = {0}; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); S3 m; @@ -193,7 +193,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute simd lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}} +#pragma omp teams distribute simd lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be lastprivate}} expected-error 2 {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target @@ -209,11 +209,11 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute simd lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp teams distribute simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute simd lastprivate(da) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp teams distribute simd lastprivate(da) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); int xa; @@ -226,7 +226,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute simd lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}} +#pragma omp teams distribute simd lastprivate(S2::S2sc) // expected-error {{const-qualified variable cannot be lastprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/clang/test/OpenMP/teams_distribute_simd_private_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_private_messages.cpp index 94fb9098a7d..f2485b36a0c 100644 --- a/clang/test/OpenMP/teams_distribute_simd_private_messages.cpp +++ b/clang/test/OpenMP/teams_distribute_simd_private_messages.cpp @@ -24,9 +24,9 @@ class S3 { public: S3():a(0) { } }; -const S3 c; // expected-note {{predetermined as shared}} -const S3 ca[5]; // expected-note {{predetermined as shared}} -extern const int f; // expected-note {{predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note {{implicitly declared private here}} @@ -45,8 +45,8 @@ S3 h; int main(int argc, char **argv) { - const int d = 5; // expected-note {{predetermined as shared}} - const int da[5] = { 0 }; // expected-note {{predetermined as shared}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = { 0 }; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); int i; @@ -85,7 +85,7 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp target - #pragma omp teams distribute simd private (a, b, c, d, f) // expected-error {{private variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be private}} + #pragma omp teams distribute simd private (a, b, c, d, f) // expected-error {{private variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be private}} expected-error 2 {{const-qualified variable cannot be private}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target @@ -97,11 +97,11 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp target - #pragma omp teams distribute simd private(ca) // expected-error {{shared variable cannot be private}} + #pragma omp teams distribute simd private(ca) // expected-error {{const-qualified variable without mutable fields cannot be private}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target - #pragma omp teams distribute simd private(da) // expected-error {{shared variable cannot be private}} + #pragma omp teams distribute simd private(da) // expected-error {{const-qualified variable cannot be private}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target diff --git a/clang/test/OpenMP/teams_private_messages.cpp b/clang/test/OpenMP/teams_private_messages.cpp index 30c7a0abd68..4ad7a0de29d 100644 --- a/clang/test/OpenMP/teams_private_messages.cpp +++ b/clang/test/OpenMP/teams_private_messages.cpp @@ -24,9 +24,9 @@ class S3 { public: S3():a(0) { } }; -const S3 c; // expected-note {{global variable is predetermined as shared}} -const S3 ca[5]; // expected-note {{global variable is predetermined as shared}} -extern const int f; // expected-note {{global variable is predetermined as shared}} +const S3 c; // expected-note {{'c' defined here}} +const S3 ca[5]; // expected-note {{'ca' defined here}} +extern const int f; // expected-note {{'f' declared here}} class S4 { int a; S4(); // expected-note {{implicitly declared private here}} @@ -52,8 +52,8 @@ 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}} + const int d = 5; // expected-note {{'d' defined here}} + const int da[5] = { 0 }; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); int i; @@ -83,7 +83,7 @@ int main(int argc, char **argv) { #pragma omp teams private (S1) // expected-error {{'S1' does not refer to a value}} foo(); #pragma omp target - #pragma omp teams private (a, b, c, d, f) // expected-error {{a private variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be private}} + #pragma omp teams private (a, b, c, d, f) // expected-error {{a private variable with incomplete type 'S1'}} expected-error 1 {{const-qualified variable without mutable fields cannot be private}} expected-error 2 {{const-qualified variable cannot be private}} foo(); #pragma omp target #pragma omp teams private (argv[1]) // expected-error {{expected variable name}} @@ -92,10 +92,10 @@ int main(int argc, char **argv) { #pragma omp teams private(ba) foo(); #pragma omp target - #pragma omp teams private(ca) // expected-error {{shared variable cannot be private}} + #pragma omp teams private(ca) // expected-error {{const-qualified variable without mutable fields cannot be private}} foo(); #pragma omp target - #pragma omp teams private(da) // expected-error {{shared variable cannot be private}} + #pragma omp teams private(da) // expected-error {{const-qualified variable cannot be private}} foo(); #pragma omp target #pragma omp teams private(S2::S2s) // expected-error {{shared variable cannot be private}} |