From: Alexey Bataev Date: Mon, 8 Jul 2019 15:45:24 +0000 (+0000) Subject: [OPENMP]Add -Wunintialized to the erroneous tests for future fix PR42392, X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1f9df1ccb8d197fc6b14b494d031914dc0091013;p=clang [OPENMP]Add -Wunintialized to the erroneous tests for future fix PR42392, NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@365334 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/OpenMP/allocate_allocator_messages.cpp b/test/OpenMP/allocate_allocator_messages.cpp index 5ba4f2a506..fced4cae9d 100644 --- a/test/OpenMP/allocate_allocator_messages.cpp +++ b/test/OpenMP/allocate_allocator_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized struct St{ int a; diff --git a/test/OpenMP/atomic_messages.c b/test/OpenMP/atomic_messages.c index 92b7cd5b6a..bace18aba9 100644 --- a/test/OpenMP/atomic_messages.c +++ b/test/OpenMP/atomic_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized int foo() { L1: diff --git a/test/OpenMP/atomic_messages.cpp b/test/OpenMP/atomic_messages.cpp index d7fa8c9e07..e4ca628075 100644 --- a/test/OpenMP/atomic_messages.cpp +++ b/test/OpenMP/atomic_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized int foo() { L1: diff --git a/test/OpenMP/cancel_if_messages.cpp b/test/OpenMP/cancel_if_messages.cpp index dc24fa4c99..3d629c927e 100644 --- a/test/OpenMP/cancel_if_messages.cpp +++ b/test/OpenMP/cancel_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp parallel { #pragma omp cancel parallel if // expected-error {{expected '(' after 'if'}} @@ -20,7 +21,7 @@ int tmain(T argc, S **argv) { #pragma omp cancel parallel if () // expected-error {{expected expression}} #pragma omp cancel parallel if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp cancel parallel if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp cancel' are ignored}} - #pragma omp cancel parallel if (argc > 0 ? argv[1] : argv[2]) + #pragma omp cancel parallel if (argc > 0 ? argv[1] : argv[2] + z) #pragma omp cancel parallel if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp cancel' cannot contain more than one 'if' clause}} #pragma omp cancel parallel if (S) // expected-error {{'S' does not refer to a value}} #pragma omp cancel parallel if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -40,6 +41,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { +int z; #pragma omp parallel { #pragma omp cancel parallel if // expected-error {{expected '(' after 'if'}} @@ -47,7 +49,7 @@ int main(int argc, char **argv) { #pragma omp cancel parallel if () // expected-error {{expected expression}} #pragma omp cancel parallel if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp cancel parallel if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp cancel' are ignored}} - #pragma omp cancel parallel if (argc > 0 ? argv[1] : argv[2]) + #pragma omp cancel parallel if (argc > 0 ? argv[1] : argv[2] - z) #pragma omp cancel parallel if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp cancel' cannot contain more than one 'if' clause}} #pragma omp cancel parallel if (S1) // expected-error {{'S1' does not refer to a value}} #pragma omp cancel parallel if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} diff --git a/test/OpenMP/cancel_messages.cpp b/test/OpenMP/cancel_messages.cpp index df6dcdf2ff..fd19f1f373 100644 --- a/test/OpenMP/cancel_messages.cpp +++ b/test/OpenMP/cancel_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized int main(int argc, char **argv) { #pragma omp cancellation // expected-error {{expected an OpenMP directive}} diff --git a/test/OpenMP/critical_messages.cpp b/test/OpenMP/critical_messages.cpp index 9222233d4a..1eec70e283 100644 --- a/test/OpenMP/critical_messages.cpp +++ b/test/OpenMP/critical_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized int foo(); diff --git a/test/OpenMP/declare_reduction_messages.c b/test/OpenMP/declare_reduction_messages.c index 27e9e6e2e2..4a0d6ef402 100644 --- a/test/OpenMP/declare_reduction_messages.c +++ b/test/OpenMP/declare_reduction_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized int temp; // expected-note 6 {{'temp' declared here}} diff --git a/test/OpenMP/declare_reduction_messages.cpp b/test/OpenMP/declare_reduction_messages.cpp index 0a79d6a0a6..a674af7151 100644 --- a/test/OpenMP/declare_reduction_messages.cpp +++ b/test/OpenMP/declare_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 %s -Wuninitialized int temp; // expected-note 7 {{'temp' declared here}} diff --git a/test/OpenMP/distribute_collapse_messages.cpp b/test/OpenMP/distribute_collapse_messages.cpp index e4164daaed..33035f2bc2 100644 --- a/test/OpenMP/distribute_collapse_messages.cpp +++ b/test/OpenMP/distribute_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/distribute_dist_schedule_messages.cpp b/test/OpenMP/distribute_dist_schedule_messages.cpp index 9f91f41f86..cd232f40fe 100644 --- a/test/OpenMP/distribute_dist_schedule_messages.cpp +++ b/test/OpenMP/distribute_dist_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -16,7 +16,7 @@ T tmain(T argc) { T b = argc, c, d, e, f, g; char ** argv; static T a; -// CHECK: static T a; + T z; #pragma omp distribute dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp distribute dist_schedule ( // expected-error {{expected 'static' in OpenMP clause 'dist_schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -31,7 +31,7 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp distribute dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error2 {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp distribute dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute' cannot contain more than one 'dist_schedule' clause}} + #pragma omp distribute dist_schedule (static), dist_schedule (static, 1 + z) // expected-error {{directive '#pragma omp distribute' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp distribute dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); @@ -41,6 +41,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { +int z; #pragma omp distribute dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp distribute dist_schedule ( // expected-error {{expected 'static' in OpenMP clause 'dist_schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -55,7 +56,7 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp distribute dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp distribute dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute' cannot contain more than one 'dist_schedule' clause}} + #pragma omp distribute dist_schedule (static), dist_schedule (static, 1 -z ) // expected-error {{directive '#pragma omp distribute' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp distribute dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); diff --git a/test/OpenMP/distribute_firstprivate_messages.cpp b/test/OpenMP/distribute_firstprivate_messages.cpp index e6dfd71c55..c13f142f30 100644 --- a/test/OpenMP/distribute_firstprivate_messages.cpp +++ b/test/OpenMP/distribute_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} expected-note{{forward declaration extern S1 a; class S2 { mutable int a; - + public: S2() : a(0) {} S2(const S2 &s2) : a(s2.a) {} @@ -26,7 +26,7 @@ const S2 ba[5]; class S3 { int a; S3 &operator=(const S3 &s3); - + public: S3() : a(0) {} // expected-note {{candidate constructor not viable: requires 0 arguments, but 1 was provided}} S3(S3 &s3) : a(s3.a) {} // expected-note {{candidate constructor not viable: 1st argument ('const S3') would lose const qualifier}} @@ -65,7 +65,7 @@ int main(int argc, char **argv) { S4 e(4); S5 g(5); S6 p; - int i; + int i, z; int &j = i; #pragma omp distribute firstprivate // expected-error {{expected '(' after 'firstprivate'}} for (i = 0; i < argc; ++i) foo(); @@ -111,7 +111,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams - #pragma omp distribute firstprivate(da) + #pragma omp distribute firstprivate(da, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams diff --git a/test/OpenMP/distribute_parallel_for_collapse_messages.cpp b/test/OpenMP/distribute_parallel_for_collapse_messages.cpp index c3298f1756..f0bd4c2840 100644 --- a/test/OpenMP/distribute_parallel_for_collapse_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/distribute_parallel_for_copyin_messages.cpp b/test/OpenMP/distribute_parallel_for_copyin_messages.cpp index 5182f24bdb..26bf6c6128 100644 --- a/test/OpenMP/distribute_parallel_for_copyin_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_copyin_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/distribute_parallel_for_default_messages.cpp b/test/OpenMP/distribute_parallel_for_default_messages.cpp index 892772b1e8..0629ba096d 100644 --- a/test/OpenMP/distribute_parallel_for_default_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/test/OpenMP/distribute_parallel_for_dist_schedule_messages.cpp b/test/OpenMP/distribute_parallel_for_dist_schedule_messages.cpp index adcef0bab9..07e7704dff 100644 --- a/test/OpenMP/distribute_parallel_for_dist_schedule_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_dist_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -13,10 +13,9 @@ struct S1; // expected-note {{declared here}} expected-note {{declared here}} template T tmain(T argc) { - T b = argc, c, d, e, f, g; + T b = argc, c, d, e, f, g, z; char ** argv; static T a; -// CHECK: static T a; #pragma omp target #pragma omp teams #pragma omp distribute parallel for dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} @@ -47,7 +46,7 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute parallel for' cannot contain more than one 'dist_schedule' clause}} +#pragma omp distribute parallel for dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp distribute parallel for' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams @@ -61,6 +60,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams #pragma omp distribute parallel for dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} @@ -91,7 +91,7 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute parallel for' cannot contain more than one 'dist_schedule' clause}} +#pragma omp distribute parallel for dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp distribute parallel for' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams diff --git a/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp b/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp index 3cebf0cd67..1678a27f21 100644 --- a/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -67,7 +67,7 @@ template int foomain(int argc, char **argv) { I e(4); C g(5); - int i; + int i, k; int &j = i; #pragma omp target #pragma omp teams @@ -126,7 +126,7 @@ int foomain(int argc, char **argv) { ++k; #pragma omp target #pragma omp teams -#pragma omp distribute parallel for firstprivate(h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}} +#pragma omp distribute parallel for firstprivate(k, h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}} for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel @@ -189,7 +189,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, k; int &j = i; #pragma omp target #pragma omp teams @@ -294,7 +294,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for firstprivate(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be firstprivate}} +#pragma omp distribute parallel for firstprivate(k, h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be firstprivate}} for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/test/OpenMP/distribute_parallel_for_if_messages.cpp b/test/OpenMP/distribute_parallel_for_if_messages.cpp index 85e78d0b92..a06ff2377c 100644 --- a/test/OpenMP/distribute_parallel_for_if_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp target #pragma omp teams #pragma omp distribute parallel for if // expected-error {{expected '(' after 'if'}} @@ -56,7 +56,7 @@ int tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for if(argc) +#pragma omp distribute parallel for if(argc+z) for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams @@ -95,7 +95,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target #pragma omp teams #pragma omp distribute parallel for if // expected-error {{expected '(' after 'if'}} @@ -158,7 +158,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for if(parallel : argc) +#pragma omp distribute parallel for if(parallel : argc-z) for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams diff --git a/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp b/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp index 4039982ef5..b91f41e6b6 100644 --- a/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/distribute_parallel_for_messages.cpp b/test/OpenMP/distribute_parallel_for_messages.cpp index 6bda5d106b..248d09b8cc 100644 --- a/test/OpenMP/distribute_parallel_for_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/distribute_parallel_for_num_threads_messages.cpp b/test/OpenMP/distribute_parallel_for_num_threads_messages.cpp index 110f5d70f8..ab301cc517 100644 --- a/test/OpenMP/distribute_parallel_for_num_threads_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_num_threads_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} T tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp target #pragma omp teams #pragma omp distribute parallel for num_threads // expected-error {{expected '(' after 'num_threads'}} @@ -52,7 +52,7 @@ T tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for num_threads (argc) +#pragma omp distribute parallel for num_threads (argc + z) for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams @@ -63,7 +63,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target #pragma omp teams #pragma omp distribute parallel for num_threads // expected-error {{expected '(' after 'num_threads'}} @@ -82,7 +82,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for' are ignored}} +#pragma omp distribute parallel for num_threads (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams diff --git a/test/OpenMP/distribute_parallel_for_private_messages.cpp b/test/OpenMP/distribute_parallel_for_private_messages.cpp index 6fadc12442..729a4a7559 100644 --- a/test/OpenMP/distribute_parallel_for_private_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/test/OpenMP/distribute_parallel_for_proc_bind_messages.cpp b/test/OpenMP/distribute_parallel_for_proc_bind_messages.cpp index febf4b0564..5c29a184eb 100644 --- a/test/OpenMP/distribute_parallel_for_proc_bind_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_proc_bind_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/test/OpenMP/distribute_parallel_for_reduction_messages.cpp b/test/OpenMP/distribute_parallel_for_reduction_messages.cpp index 99f928a345..75b4112fee 100644 --- a/test/OpenMP/distribute_parallel_for_reduction_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -88,7 +88,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -176,7 +176,7 @@ T tmain(T argc) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} +#pragma omp distribute parallel for reduction(+ : ba, z) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -272,7 +272,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -434,7 +434,7 @@ int main(int argc, char **argv) { #pragma omp parallel private(fl) #pragma omp target #pragma omp teams -#pragma omp distribute parallel for reduction(+ : fl) +#pragma omp distribute parallel for reduction(+ : fl, z) for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel reduction(* : fl) diff --git a/test/OpenMP/distribute_parallel_for_schedule_messages.cpp b/test/OpenMP/distribute_parallel_for_schedule_messages.cpp index 1f521d4f6f..80dc233961 100644 --- a/test/OpenMP/distribute_parallel_for_schedule_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} T tmain(T argc, S **argv) { + T z; #pragma omp target #pragma omp teams #pragma omp distribute parallel for schedule // expected-error {{expected '(' after 'schedule'}} @@ -57,7 +58,7 @@ T tmain(T argc, S **argv) { for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp target #pragma omp teams -#pragma omp distribute parallel for schedule (guided, (ST > 0) ? 1 + ST : 2) +#pragma omp distribute parallel for schedule (guided, (ST > 0) ? 1 + ST : 2 + z) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+4 2 {{directive '#pragma omp distribute parallel for' cannot contain more than one 'schedule' clause}} // expected-error@+3 {{argument to 'schedule' clause must be a strictly positive integer value}} @@ -86,6 +87,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams #pragma omp distribute parallel for schedule // expected-error {{expected '(' after 'schedule'}} @@ -124,7 +126,7 @@ int main(int argc, char **argv) { for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp target #pragma omp teams -#pragma omp distribute parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2) +#pragma omp distribute parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2 - z) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error@+4 2 {{directive '#pragma omp distribute parallel for' cannot contain more than one 'schedule' clause}} // expected-error@+3 {{argument to 'schedule' clause must be a strictly positive integer value}} diff --git a/test/OpenMP/distribute_parallel_for_shared_messages.cpp b/test/OpenMP/distribute_parallel_for_shared_messages.cpp index 6700b80cad..d5a68f65b7 100644 --- a/test/OpenMP/distribute_parallel_for_shared_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized struct S1; // expected-note 2 {{declared here}} diff --git a/test/OpenMP/distribute_parallel_for_simd_aligned_messages.cpp b/test/OpenMP/distribute_parallel_for_simd_aligned_messages.cpp index 40d72418c7..27f5f60c1d 100644 --- a/test/OpenMP/distribute_parallel_for_simd_aligned_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_simd_aligned_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct B { static int ib[20]; // expected-note 0 {{'B::ib' declared here}} diff --git a/test/OpenMP/distribute_parallel_for_simd_collapse_messages.cpp b/test/OpenMP/distribute_parallel_for_simd_collapse_messages.cpp index 9399594be2..a3e324d32b 100644 --- a/test/OpenMP/distribute_parallel_for_simd_collapse_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_simd_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/distribute_parallel_for_simd_copyin_messages.cpp b/test/OpenMP/distribute_parallel_for_simd_copyin_messages.cpp index 2d72925518..e382a22114 100644 --- a/test/OpenMP/distribute_parallel_for_simd_copyin_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_simd_copyin_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -126,7 +126,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target #pragma omp teams #pragma omp distribute parallel for simd copyin // expected-error {{expected '(' after 'copyin'}} diff --git a/test/OpenMP/distribute_parallel_for_simd_default_messages.cpp b/test/OpenMP/distribute_parallel_for_simd_default_messages.cpp index 3f00436181..b9c5546ec5 100644 --- a/test/OpenMP/distribute_parallel_for_simd_default_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_simd_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/test/OpenMP/distribute_parallel_for_simd_dist_schedule_messages.cpp b/test/OpenMP/distribute_parallel_for_simd_dist_schedule_messages.cpp index f029b0e187..ed7b19111d 100644 --- a/test/OpenMP/distribute_parallel_for_simd_dist_schedule_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_simd_dist_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -16,7 +16,7 @@ T tmain(T argc) { T b = argc, c, d, e, f, g; char ** argv; static T a; -// CHECK: static T a; + T k; #pragma omp target #pragma omp teams #pragma omp distribute parallel for simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} @@ -47,7 +47,7 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}} +#pragma omp distribute parallel for simd dist_schedule (static), dist_schedule (static, k) // expected-error {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams @@ -61,6 +61,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int k; #pragma omp target #pragma omp teams #pragma omp distribute parallel for simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} @@ -91,7 +92,7 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}} +#pragma omp distribute parallel for simd dist_schedule (static), dist_schedule (static, k) // expected-error {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams diff --git a/test/OpenMP/distribute_parallel_for_simd_firstprivate_messages.cpp b/test/OpenMP/distribute_parallel_for_simd_firstprivate_messages.cpp index f574335baf..aa33807c42 100644 --- a/test/OpenMP/distribute_parallel_for_simd_firstprivate_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_simd_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -67,7 +67,7 @@ template int foomain(int argc, char **argv) { I e(4); C g(5); - int i; + int i, z; int &j = i; #pragma omp target #pragma omp teams @@ -101,7 +101,7 @@ int foomain(int argc, char **argv) { ++k; #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd firstprivate(argc) +#pragma omp distribute parallel for simd firstprivate(argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp target @@ -189,7 +189,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp target #pragma omp teams @@ -248,7 +248,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd firstprivate(ba) // OK +#pragma omp distribute parallel for simd firstprivate(ba, z) // OK for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/test/OpenMP/distribute_parallel_for_simd_if_messages.cpp b/test/OpenMP/distribute_parallel_for_simd_if_messages.cpp index 0f9e12381f..7769272026 100644 --- a/test/OpenMP/distribute_parallel_for_simd_if_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_simd_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { - T i; + T i, k; #pragma omp target #pragma omp teams #pragma omp distribute parallel for simd if // expected-error {{expected '(' after 'if'}} @@ -32,7 +32,7 @@ int tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}} +#pragma omp distribute parallel for simd if (k)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams @@ -95,7 +95,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, k; #pragma omp target #pragma omp teams #pragma omp distribute parallel for simd if // expected-error {{expected '(' after 'if'}} @@ -114,7 +114,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}} +#pragma omp distribute parallel for simd if (k)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams diff --git a/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp b/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp index 71658a6650..110e102e64 100644 --- a/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_simd_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -69,7 +69,7 @@ template int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp target #pragma omp teams @@ -103,7 +103,7 @@ int foomain(int argc, char **argv) { ++k; #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd lastprivate(argc) +#pragma omp distribute parallel for simd lastprivate(argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp target @@ -178,7 +178,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp target #pragma omp teams @@ -237,7 +237,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd lastprivate(ba) +#pragma omp distribute parallel for simd lastprivate(ba, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/test/OpenMP/distribute_parallel_for_simd_linear_messages.cpp b/test/OpenMP/distribute_parallel_for_simd_linear_messages.cpp index 8f2df4215b..e8521c06d9 100644 --- a/test/OpenMP/distribute_parallel_for_simd_linear_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_simd_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; namespace X { diff --git a/test/OpenMP/distribute_parallel_for_simd_loop_messages.cpp b/test/OpenMP/distribute_parallel_for_simd_loop_messages.cpp index 2c0d7ab742..ef17dd499d 100644 --- a/test/OpenMP/distribute_parallel_for_simd_loop_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_simd_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized class S { int a; diff --git a/test/OpenMP/distribute_parallel_for_simd_misc_messages.c b/test/OpenMP/distribute_parallel_for_simd_misc_messages.c index c2bee7ffa7..e4cefcbf72 100644 --- a/test/OpenMP/distribute_parallel_for_simd_misc_messages.c +++ b/test/OpenMP/distribute_parallel_for_simd_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp distribute parallel for simd'}} #pragma omp distribute parallel for simd diff --git a/test/OpenMP/distribute_parallel_for_simd_num_threads_messages.cpp b/test/OpenMP/distribute_parallel_for_simd_num_threads_messages.cpp index 5f5165d979..9f9de197ac 100644 --- a/test/OpenMP/distribute_parallel_for_simd_num_threads_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_simd_num_threads_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} T tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp target #pragma omp teams #pragma omp distribute parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}} @@ -32,7 +32,7 @@ T tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}} +#pragma omp distribute parallel for simd num_threads (z + argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams @@ -63,7 +63,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target #pragma omp teams #pragma omp distribute parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}} @@ -82,7 +82,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}} +#pragma omp distribute parallel for simd num_threads (z/argc)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams diff --git a/test/OpenMP/distribute_parallel_for_simd_private_messages.cpp b/test/OpenMP/distribute_parallel_for_simd_private_messages.cpp index 50a7fb5ac9..615a45f584 100644 --- a/test/OpenMP/distribute_parallel_for_simd_private_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_simd_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/test/OpenMP/distribute_parallel_for_simd_proc_bind_messages.cpp b/test/OpenMP/distribute_parallel_for_simd_proc_bind_messages.cpp index d81f7d9920..d159ca94e9 100644 --- a/test/OpenMP/distribute_parallel_for_simd_proc_bind_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_simd_proc_bind_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp b/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp index 150f50171a..0b27fe25e4 100644 --- a/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_simd_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -88,7 +88,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -151,7 +151,7 @@ T tmain(T argc) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd reduction(&& : argc) +#pragma omp distribute parallel for simd reduction(&& : argc, z) for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -272,7 +272,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -400,7 +400,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd reduction(+ : o) // expected-error {{no viable overloaded '='}} +#pragma omp distribute parallel for simd reduction(+ : z, o) // expected-error {{no viable overloaded '='}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target diff --git a/test/OpenMP/distribute_parallel_for_simd_safelen_messages.cpp b/test/OpenMP/distribute_parallel_for_simd_safelen_messages.cpp index 7e76c1f6ab..e39b5d9fbc 100644 --- a/test/OpenMP/distribute_parallel_for_simd_safelen_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_simd_safelen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/distribute_parallel_for_simd_schedule_messages.cpp b/test/OpenMP/distribute_parallel_for_simd_schedule_messages.cpp index 8a5ffd1594..84cadd41cf 100644 --- a/test/OpenMP/distribute_parallel_for_simd_schedule_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_simd_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} T tmain(T argc, S **argv) { + T z; #pragma omp target #pragma omp teams #pragma omp distribute parallel for simd schedule // expected-error {{expected '(' after 'schedule'}} @@ -57,7 +58,7 @@ T tmain(T argc, S **argv) { for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd schedule (guided, (ST > 0) ? 1 + ST : 2) +#pragma omp distribute parallel for simd schedule (guided, (ST > 0) ? 1 + ST : 2 + z) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+4 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'schedule' clause}} // expected-error@+3 {{argument to 'schedule' clause must be a strictly positive integer value}} @@ -86,6 +87,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams #pragma omp distribute parallel for simd schedule // expected-error {{expected '(' after 'schedule'}} @@ -124,7 +126,7 @@ int main(int argc, char **argv) { for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2) +#pragma omp distribute parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2 -z) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error@+4 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'schedule' clause}} // expected-error@+3 {{argument to 'schedule' clause must be a strictly positive integer value}} diff --git a/test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp b/test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp index d037e4cd93..8e21c07c6c 100644 --- a/test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_simd_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized struct S1; // expected-note 2 {{declared here}} @@ -54,7 +54,7 @@ T tmain(T argc, S **argv) { const int da[5] = { 0 }; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; int acc = 0; int n = 1000; @@ -103,7 +103,7 @@ T tmain(T argc, S **argv) { #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd shared (argc) +#pragma omp distribute parallel for simd shared (argc, z) for(int k = 0 ; k < n ; k++) { acc++; } @@ -228,7 +228,7 @@ int main(int argc, char **argv) { const int da[5] = { 0 }; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; int acc = 0; int n = argc; @@ -277,7 +277,7 @@ int main(int argc, char **argv) { #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd shared (argc) +#pragma omp distribute parallel for simd shared (argc, z) for(int k = 0 ; k < n ; k++) { acc++; } diff --git a/test/OpenMP/distribute_parallel_for_simd_simdlen_messages.cpp b/test/OpenMP/distribute_parallel_for_simd_simdlen_messages.cpp index 9c1c552033..7cede34162 100644 --- a/test/OpenMP/distribute_parallel_for_simd_simdlen_messages.cpp +++ b/test/OpenMP/distribute_parallel_for_simd_simdlen_messages.cpp @@ -1,9 +1,9 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/distribute_private_messages.cpp b/test/OpenMP/distribute_private_messages.cpp index fe5c0257a9..b3bdaffcbd 100644 --- a/test/OpenMP/distribute_private_messages.cpp +++ b/test/OpenMP/distribute_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -34,7 +34,7 @@ class S4 { public: S4(int v):a(v) { } }; -class S5 { +class S5 { int a; S5():a(0) {} // expected-note {{implicitly declared private here}} public: diff --git a/test/OpenMP/distribute_simd_aligned_messages.cpp b/test/OpenMP/distribute_simd_aligned_messages.cpp index 8c4a8d9569..0febeed586 100644 --- a/test/OpenMP/distribute_simd_aligned_messages.cpp +++ b/test/OpenMP/distribute_simd_aligned_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct B { static int ib[20]; // expected-note 0 {{'B::ib' declared here}} diff --git a/test/OpenMP/distribute_simd_collapse_messages.cpp b/test/OpenMP/distribute_simd_collapse_messages.cpp index 204719a2e6..2d3983cc55 100644 --- a/test/OpenMP/distribute_simd_collapse_messages.cpp +++ b/test/OpenMP/distribute_simd_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/distribute_simd_dist_schedule_messages.cpp b/test/OpenMP/distribute_simd_dist_schedule_messages.cpp index c659abe71b..794681c026 100644 --- a/test/OpenMP/distribute_simd_dist_schedule_messages.cpp +++ b/test/OpenMP/distribute_simd_dist_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -16,7 +16,7 @@ T tmain(T argc) { T b = argc, c, d, e, f, g; char ** argv; static T a; -// CHECK: static T a; + T z; #pragma omp target #pragma omp teams @@ -55,7 +55,7 @@ T tmain(T argc) { #pragma omp target #pragma omp teams -#pragma omp distribute simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute simd' cannot contain more than one 'dist_schedule' clause}} +#pragma omp distribute simd dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp distribute simd' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target #pragma omp teams @@ -69,6 +69,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams #pragma omp distribute simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} @@ -106,7 +107,7 @@ int main(int argc, char **argv) { #pragma omp target #pragma omp teams -#pragma omp distribute simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp distribute simd' cannot contain more than one 'dist_schedule' clause}} +#pragma omp distribute simd dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp distribute simd' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target diff --git a/test/OpenMP/distribute_simd_firstprivate_messages.cpp b/test/OpenMP/distribute_simd_firstprivate_messages.cpp index 6059415582..b73ecc274d 100644 --- a/test/OpenMP/distribute_simd_firstprivate_messages.cpp +++ b/test/OpenMP/distribute_simd_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -67,7 +67,7 @@ template int foomain(int argc, char **argv) { I e(4); C g(5); - int i; + int i, z; int &j = i; #pragma omp target #pragma omp teams @@ -111,7 +111,7 @@ int foomain(int argc, char **argv) { ++k; #pragma omp target #pragma omp teams -#pragma omp distribute simd firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-warning {{Non-trivial type 'const S2' is mapped, only trivial types are guaranteed to be mapped correctly}} +#pragma omp distribute simd firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-warning {{Non-trivial type 'const S2' is mapped, only trivial types are guaranteed to be mapped correctly}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target @@ -189,7 +189,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp target #pragma omp teams @@ -223,7 +223,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd firstprivate(argc) +#pragma omp distribute simd firstprivate(argc, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/test/OpenMP/distribute_simd_lastprivate_messages.cpp b/test/OpenMP/distribute_simd_lastprivate_messages.cpp index 6037551c5b..50a1fc387e 100644 --- a/test/OpenMP/distribute_simd_lastprivate_messages.cpp +++ b/test/OpenMP/distribute_simd_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -69,7 +69,7 @@ template int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp target #pragma omp teams @@ -103,7 +103,7 @@ int foomain(int argc, char **argv) { ++k; #pragma omp target #pragma omp teams -#pragma omp distribute simd lastprivate(argc) +#pragma omp distribute simd lastprivate(argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp target diff --git a/test/OpenMP/distribute_simd_linear_messages.cpp b/test/OpenMP/distribute_simd_linear_messages.cpp index e5c2aceea8..53bd4c05da 100644 --- a/test/OpenMP/distribute_simd_linear_messages.cpp +++ b/test/OpenMP/distribute_simd_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; namespace X { diff --git a/test/OpenMP/distribute_simd_loop_messages.cpp b/test/OpenMP/distribute_simd_loop_messages.cpp index b46bdad0b6..ee57cd5af3 100644 --- a/test/OpenMP/distribute_simd_loop_messages.cpp +++ b/test/OpenMP/distribute_simd_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized static int sii; // expected-note@+1 {{defined as threadprivate or thread local}} diff --git a/test/OpenMP/distribute_simd_misc_messages.c b/test/OpenMP/distribute_simd_misc_messages.c index 2cb5e97273..5286e5f8d6 100644 --- a/test/OpenMP/distribute_simd_misc_messages.c +++ b/test/OpenMP/distribute_simd_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp distribute simd'}} #pragma omp distribute simd diff --git a/test/OpenMP/distribute_simd_private_messages.cpp b/test/OpenMP/distribute_simd_private_messages.cpp index 47b1b0c74f..95564226b8 100644 --- a/test/OpenMP/distribute_simd_private_messages.cpp +++ b/test/OpenMP/distribute_simd_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/test/OpenMP/distribute_simd_reduction_messages.cpp b/test/OpenMP/distribute_simd_reduction_messages.cpp index b1fe7f684d..4486877025 100644 --- a/test/OpenMP/distribute_simd_reduction_messages.cpp +++ b/test/OpenMP/distribute_simd_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -89,6 +89,7 @@ T tmain(T argc) { const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; T i; + long z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -156,7 +157,7 @@ T tmain(T argc) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd reduction(^ : T) // expected-error {{'T' does not refer to a value}} +#pragma omp distribute simd reduction(^ : z, T) // expected-error {{'T' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -272,7 +273,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -335,7 +336,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target #pragma omp teams -#pragma omp distribute simd reduction(&& : argc) +#pragma omp distribute simd reduction(&& : z, argc) for (int i = 0; i < 10; ++i) foo(); #pragma omp target diff --git a/test/OpenMP/distribute_simd_safelen_messages.cpp b/test/OpenMP/distribute_simd_safelen_messages.cpp index 30c0976368..c28b1bf1a1 100644 --- a/test/OpenMP/distribute_simd_safelen_messages.cpp +++ b/test/OpenMP/distribute_simd_safelen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/distribute_simd_simdlen_messages.cpp b/test/OpenMP/distribute_simd_simdlen_messages.cpp index 30c0976368..c28b1bf1a1 100644 --- a/test/OpenMP/distribute_simd_simdlen_messages.cpp +++ b/test/OpenMP/distribute_simd_simdlen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/flush_messages.cpp b/test/OpenMP/flush_messages.cpp index 36a8ef6d49..5838e12ce8 100644 --- a/test/OpenMP/flush_messages.cpp +++ b/test/OpenMP/flush_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized struct S1 { // expected-note 2 {{declared here}} int a; diff --git a/test/OpenMP/for_collapse_messages.cpp b/test/OpenMP/for_collapse_messages.cpp index 5530ddcc6a..ce656515b1 100644 --- a/test/OpenMP/for_collapse_messages.cpp +++ b/test/OpenMP/for_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } @@ -29,7 +29,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}} // expected-error@+3 {{expected ')'}} expected-note@+3 {{to match this '('}} // expected-error@+2 2 {{expression is not an integral constant expression}} // expected-note@+1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} - #pragma omp for collapse (argc + #pragma omp for collapse (argc for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}} #pragma omp for collapse (ST // expected-error {{expected ')'}} expected-note {{to match this '('}} diff --git a/test/OpenMP/for_firstprivate_messages.cpp b/test/OpenMP/for_firstprivate_messages.cpp index 22b034e0f2..de2ad14ae5 100644 --- a/test/OpenMP/for_firstprivate_messages.cpp +++ b/test/OpenMP/for_firstprivate_messages.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -172,7 +172,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, k; int &j = i; #pragma omp parallel #pragma omp for firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -207,7 +207,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp for firstprivate(a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-error {{no matching constructor for initialization of 'S3'}} +#pragma omp for firstprivate(a, b, c, d, f, k) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-error {{no matching constructor for initialization of 'S3'}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel diff --git a/test/OpenMP/for_lastprivate_messages.cpp b/test/OpenMP/for_lastprivate_messages.cpp index 40222c1f5e..919b40f9cc 100644 --- a/test/OpenMP/for_lastprivate_messages.cpp +++ b/test/OpenMP/for_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -69,7 +69,7 @@ template int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, k; int &j = i; #pragma omp parallel #pragma omp for lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -112,7 +112,7 @@ int foomain(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel -#pragma omp for lastprivate(e, g) // expected-error 2 {{calling a private constructor of class 'S4'}} +#pragma omp for lastprivate(k, e, g) // expected-error 2 {{calling a private constructor of class 'S4'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel @@ -163,7 +163,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, k; int &j = i; #pragma omp parallel #pragma omp for lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -190,7 +190,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp for lastprivate(argc) +#pragma omp for lastprivate(argc, k) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel diff --git a/test/OpenMP/for_linear_messages.cpp b/test/OpenMP/for_linear_messages.cpp index c984aa5a9f..3a54acb26b 100644 --- a/test/OpenMP/for_linear_messages.cpp +++ b/test/OpenMP/for_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; namespace X { @@ -104,7 +104,7 @@ S3 h; template int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, k; int &j = i; #pragma omp for linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) ++k; @@ -128,7 +128,7 @@ template int foomain(I argc, C **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp for linear (argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; - #pragma omp for linear(e, g) + #pragma omp for linear(e, g, k) for (int k = 0; k < argc; ++k) ++k; #pragma omp for linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}} for (int k = 0; k < argc; ++k) ++k; @@ -170,7 +170,7 @@ int main(int argc, char **argv) { S4 e(4); // expected-note {{'e' defined here}} S5 g(5); // expected-note {{'g' defined here}} - int i; + int i, k; int &j = i; #pragma omp for linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) ++k; @@ -190,7 +190,7 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; // expected-error@+2 {{linear variable with incomplete type 'S1'}} // expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}} - #pragma omp for linear(a, b) + #pragma omp for linear(a, b, k) for (int k = 0; k < argc; ++k) ++k; #pragma omp for linear (argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; diff --git a/test/OpenMP/for_loop_messages.cpp b/test/OpenMP/for_loop_messages.cpp index f5ee0d4442..7c2663f618 100644 --- a/test/OpenMP/for_loop_messages.cpp +++ b/test/OpenMP/for_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized class S { int a; diff --git a/test/OpenMP/for_misc_messages.c b/test/OpenMP/for_misc_messages.c index 901d66dd68..e36a1c6db0 100644 --- a/test/OpenMP/for_misc_messages.c +++ b/test/OpenMP/for_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp for'}} #pragma omp for diff --git a/test/OpenMP/for_private_messages.cpp b/test/OpenMP/for_private_messages.cpp index 44a05f709f..877d683ce6 100644 --- a/test/OpenMP/for_private_messages.cpp +++ b/test/OpenMP/for_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/test/OpenMP/for_reduction_messages.cpp b/test/OpenMP/for_reduction_messages.cpp index 397e54f1fc..a082e5843e 100644 --- a/test/OpenMP/for_reduction_messages.cpp +++ b/test/OpenMP/for_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -88,7 +88,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -147,11 +147,11 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp for reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} +#pragma omp for reduction(min : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel @@ -245,7 +245,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -312,7 +312,7 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for reduction(max : argv[1]) +#pragma omp for reduction(max : argv[1], z) for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel diff --git a/test/OpenMP/for_schedule_messages.cpp b/test/OpenMP/for_schedule_messages.cpp index f4b5b3a26d..95e9a2a1ae 100644 --- a/test/OpenMP/for_schedule_messages.cpp +++ b/test/OpenMP/for_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} T tmain(T argc, S **argv) { + T z; #pragma omp for schedule // expected-error {{expected '(' after 'schedule'}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -45,7 +46,7 @@ T tmain(T argc, S **argv) { for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp for schedule (dynamic, 1)) // expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; - #pragma omp for schedule (guided, (ST > 0) ? 1 + ST : 2) + #pragma omp for schedule (guided, (ST > 0) ? 1 + ST : 2 + z) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+2 2 {{directive '#pragma omp for' cannot contain more than one 'schedule' clause}} // expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}} @@ -82,6 +83,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp for schedule // expected-error {{expected '(' after 'schedule'}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -98,7 +100,7 @@ int main(int argc, char **argv) { for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp for schedule (guided, 4 // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; - #pragma omp for schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}} + #pragma omp for schedule (static, 2+2-z)) // expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp for schedule (dynamic, foobool(1) > 0 ? 1 : 2) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; diff --git a/test/OpenMP/for_simd_aligned_messages.cpp b/test/OpenMP/for_simd_aligned_messages.cpp index fce9aca998..c7122bbe4f 100644 --- a/test/OpenMP/for_simd_aligned_messages.cpp +++ b/test/OpenMP/for_simd_aligned_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct B { static int ib[20]; // expected-note 0 {{'B::ib' declared here}} diff --git a/test/OpenMP/for_simd_collapse_messages.cpp b/test/OpenMP/for_simd_collapse_messages.cpp index f5c130f30a..2781bb9d5e 100644 --- a/test/OpenMP/for_simd_collapse_messages.cpp +++ b/test/OpenMP/for_simd_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/for_simd_firstprivate_messages.cpp b/test/OpenMP/for_simd_firstprivate_messages.cpp index b6b51d8686..6dba2f81be 100644 --- a/test/OpenMP/for_simd_firstprivate_messages.cpp +++ b/test/OpenMP/for_simd_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/test/OpenMP/for_simd_lastprivate_messages.cpp b/test/OpenMP/for_simd_lastprivate_messages.cpp index b3589d90d7..a69a3c18fb 100644 --- a/test/OpenMP/for_simd_lastprivate_messages.cpp +++ b/test/OpenMP/for_simd_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -69,7 +69,7 @@ template int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp parallel #pragma omp for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -104,7 +104,7 @@ int foomain(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel -#pragma omp for simd lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} +#pragma omp for simd lastprivate(z, a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel @@ -160,7 +160,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp parallel #pragma omp for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -187,7 +187,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp for simd lastprivate(argc) +#pragma omp for simd lastprivate(argc, z) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel diff --git a/test/OpenMP/for_simd_linear_messages.cpp b/test/OpenMP/for_simd_linear_messages.cpp index ffa2233b55..9df53aeaca 100644 --- a/test/OpenMP/for_simd_linear_messages.cpp +++ b/test/OpenMP/for_simd_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; namespace X { @@ -137,8 +137,9 @@ template int foomain(I argc, C **argv) { #pragma omp parallel { int v = 0; + long z; int i; - #pragma omp for simd linear(v:i) + #pragma omp for simd linear(z, v:i) for (int k = 0; k < argc; ++k) { i = k; v += i; } } #pragma omp for simd linear(j) @@ -188,7 +189,7 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; // expected-error@+2 {{linear variable with incomplete type 'S1'}} // expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}} - #pragma omp for simd linear (a, b) + #pragma omp for simd linear(a, b) for (int k = 0; k < argc; ++k) ++k; #pragma omp for simd linear (argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; @@ -201,7 +202,7 @@ int main(int argc, char **argv) { #pragma omp parallel { int i; - #pragma omp for simd linear(i) + #pragma omp for simd linear(i : i) for (int k = 0; k < argc; ++k) ++k; #pragma omp for simd linear(i : 4) for (int k = 0; k < argc; ++k) { ++k; i += 4; } diff --git a/test/OpenMP/for_simd_loop_messages.cpp b/test/OpenMP/for_simd_loop_messages.cpp index 29ab738dd1..2a5a6e87f7 100644 --- a/test/OpenMP/for_simd_loop_messages.cpp +++ b/test/OpenMP/for_simd_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized class S { int a; diff --git a/test/OpenMP/for_simd_misc_messages.c b/test/OpenMP/for_simd_misc_messages.c index 4da2e6bb6c..bdce97431c 100644 --- a/test/OpenMP/for_simd_misc_messages.c +++ b/test/OpenMP/for_simd_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp for simd'}} #pragma omp for simd diff --git a/test/OpenMP/for_simd_private_messages.cpp b/test/OpenMP/for_simd_private_messages.cpp index ff3249e64c..0bf33797e0 100644 --- a/test/OpenMP/for_simd_private_messages.cpp +++ b/test/OpenMP/for_simd_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/test/OpenMP/for_simd_reduction_messages.cpp b/test/OpenMP/for_simd_reduction_messages.cpp index c4bed65d98..9a112bc2c5 100644 --- a/test/OpenMP/for_simd_reduction_messages.cpp +++ b/test/OpenMP/for_simd_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -87,7 +87,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -146,7 +146,7 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp for simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel @@ -236,7 +236,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -287,7 +287,7 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel -#pragma omp for simd reduction(&& : argc) +#pragma omp for simd reduction(&& : argc, z) for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel diff --git a/test/OpenMP/for_simd_safelen_messages.cpp b/test/OpenMP/for_simd_safelen_messages.cpp index 6868b938c2..c97e2a951a 100644 --- a/test/OpenMP/for_simd_safelen_messages.cpp +++ b/test/OpenMP/for_simd_safelen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/for_simd_schedule_messages.cpp b/test/OpenMP/for_simd_schedule_messages.cpp index b330f8cfd0..08e3c022cf 100644 --- a/test/OpenMP/for_simd_schedule_messages.cpp +++ b/test/OpenMP/for_simd_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} T tmain(T argc, S **argv) { + T z; #pragma omp for simd schedule // expected-error {{expected '(' after 'schedule'}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp for simd schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -35,7 +36,7 @@ T tmain(T argc, S **argv) { for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp for simd schedule (dynamic, 1)) // expected-warning {{extra tokens at the end of '#pragma omp for simd' are ignored}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; - #pragma omp for simd schedule (guided, (ST > 0) ? 1 + ST : 2) + #pragma omp for simd schedule (guided, (ST > 0) ? 1 + ST : 2 + z) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+2 2 {{directive '#pragma omp for simd' cannot contain more than one 'schedule' clause}} // expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}} @@ -54,6 +55,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp for simd schedule // expected-error {{expected '(' after 'schedule'}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp for simd schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -72,7 +74,7 @@ int main(int argc, char **argv) { for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp for simd schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp for simd' are ignored}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; - #pragma omp for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2) + #pragma omp for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2 - z) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error@+2 2 {{directive '#pragma omp for simd' cannot contain more than one 'schedule' clause}} // expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}} diff --git a/test/OpenMP/for_simd_simdlen_messages.cpp b/test/OpenMP/for_simd_simdlen_messages.cpp index 86cc4690a9..5ae2fbbc8d 100644 --- a/test/OpenMP/for_simd_simdlen_messages.cpp +++ b/test/OpenMP/for_simd_simdlen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/master_messages.cpp b/test/OpenMP/master_messages.cpp index 702da24b63..07c863f909 100644 --- a/test/OpenMP/master_messages.cpp +++ b/test/OpenMP/master_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized int foo(); diff --git a/test/OpenMP/ordered_messages.cpp b/test/OpenMP/ordered_messages.cpp index 294e7455af..6404ec8bf9 100644 --- a/test/OpenMP/ordered_messages.cpp +++ b/test/OpenMP/ordered_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++98 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++98 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++98 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++98 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized int foo(); diff --git a/test/OpenMP/parallel_copyin_messages.cpp b/test/OpenMP/parallel_copyin_messages.cpp index 81a507addf..4064b02022 100644 --- a/test/OpenMP/parallel_copyin_messages.cpp +++ b/test/OpenMP/parallel_copyin_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/parallel_default_messages.cpp b/test/OpenMP/parallel_default_messages.cpp index 440e91b103..6ae0ba51ac 100644 --- a/test/OpenMP/parallel_default_messages.cpp +++ b/test/OpenMP/parallel_default_messages.cpp @@ -1,9 +1,9 @@ -// RUN: %clang_cc1 -verify -fopenmp -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 +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-version=50 -fopenmp -ferror-limit 100 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify=expected,ge40 -fopenmp-version=40 -fopenmp -ferror-limit 100 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-version=31 -fopenmp -ferror-limit 100 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-version=30 -fopenmp -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/test/OpenMP/parallel_firstprivate_messages.cpp b/test/OpenMP/parallel_firstprivate_messages.cpp index 6c5a41c589..b0f0c6a8c8 100644 --- a/test/OpenMP/parallel_firstprivate_messages.cpp +++ b/test/OpenMP/parallel_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -63,7 +63,7 @@ int main(int argc, char **argv) { const int da[5] = { 0 }; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; static int m; #pragma omp parallel firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -75,7 +75,7 @@ int main(int argc, char **argv) { #pragma omp parallel firstprivate (argc) allocate , allocate(, allocate(omp_default , allocate(omp_default_mem_alloc, allocate(omp_default_mem_alloc:, allocate(omp_default_mem_alloc: argc, allocate(omp_default_mem_alloc: argv), allocate(argv) // expected-error {{expected '(' after 'allocate'}} expected-error 2 {{expected expression}} expected-error 2 {{expected ')'}} expected-error {{use of undeclared identifier 'omp_default'}} expected-note 2 {{to match this '('}} #pragma omp parallel firstprivate (S1) // expected-error {{'S1' does not refer to a value}} #pragma omp parallel firstprivate (a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} - #pragma omp parallel firstprivate (d) + #pragma omp parallel firstprivate (z, d) d = 5; // expected-error {{cannot assign to variable 'd' with const-qualified type}} #pragma omp parallel firstprivate (argv[1]) // expected-error {{expected variable name}} #pragma omp parallel firstprivate(ba) diff --git a/test/OpenMP/parallel_for_collapse_messages.cpp b/test/OpenMP/parallel_for_collapse_messages.cpp index 192fa45c90..d03e1b820e 100644 --- a/test/OpenMP/parallel_for_collapse_messages.cpp +++ b/test/OpenMP/parallel_for_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/parallel_for_copyin_messages.cpp b/test/OpenMP/parallel_for_copyin_messages.cpp index 265a1953e0..af13549ecd 100644 --- a/test/OpenMP/parallel_for_copyin_messages.cpp +++ b/test/OpenMP/parallel_for_copyin_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/parallel_for_default_messages.cpp b/test/OpenMP/parallel_for_default_messages.cpp index 8baa2f6c04..b02fa8803a 100644 --- a/test/OpenMP/parallel_for_default_messages.cpp +++ b/test/OpenMP/parallel_for_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/test/OpenMP/parallel_for_firstprivate_messages.cpp b/test/OpenMP/parallel_for_firstprivate_messages.cpp index 752d0325e6..28a21a49e6 100644 --- a/test/OpenMP/parallel_for_firstprivate_messages.cpp +++ b/test/OpenMP/parallel_for_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -67,7 +67,7 @@ template int foomain(int argc, char **argv) { I e(4); C g(5); - int i; + int i, z; int &j = i; #pragma omp parallel for firstprivate // expected-error {{expected '(' after 'firstprivate'}} for (int k = 0; k < argc; ++k) @@ -93,7 +93,7 @@ int foomain(int argc, char **argv) { #pragma omp parallel for firstprivate(S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp parallel for firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} +#pragma omp parallel for firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for firstprivate(argv[1]) // expected-error {{expected variable name}} diff --git a/test/OpenMP/parallel_for_if_messages.cpp b/test/OpenMP/parallel_for_if_messages.cpp index 1d83d3585d..32f9ef3a7d 100644 --- a/test/OpenMP/parallel_for_if_messages.cpp +++ b/test/OpenMP/parallel_for_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp parallel for if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -34,7 +34,7 @@ int tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp parallel for if(argc) + #pragma omp parallel for if(argc/z) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for if(parallel // expected-error {{use of undeclared identifier 'parallel'}} expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); @@ -55,7 +55,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i,z; #pragma omp parallel for if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -86,7 +86,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp parallel for if(parallel : argc) + #pragma omp parallel for if(parallel : z*argc) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for if(parallel : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp parallel for'}} for (i = 0; i < argc; ++i) foo(); diff --git a/test/OpenMP/parallel_for_lastprivate_messages.cpp b/test/OpenMP/parallel_for_lastprivate_messages.cpp index 5c782a5637..4a7c346bbf 100644 --- a/test/OpenMP/parallel_for_lastprivate_messages.cpp +++ b/test/OpenMP/parallel_for_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -69,7 +69,7 @@ template int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp parallel for lastprivate // expected-error {{expected '(' after 'lastprivate'}} for (int k = 0; k < argc; ++k) @@ -95,7 +95,7 @@ int foomain(int argc, char **argv) { #pragma omp parallel for lastprivate(S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp parallel for lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} +#pragma omp parallel for lastprivate(z, a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for lastprivate(argv[1]) // expected-error {{expected variable name}} @@ -143,7 +143,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp parallel for lastprivate // expected-error {{expected '(' after 'lastprivate'}} for (i = 0; i < argc; ++i) @@ -163,7 +163,7 @@ int main(int argc, char **argv) { #pragma omp parallel for lastprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (i = 0; i < argc; ++i) foo(); -#pragma omp parallel for lastprivate(argc) +#pragma omp parallel for lastprivate(argc, z) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for lastprivate(S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/parallel_for_linear_messages.cpp b/test/OpenMP/parallel_for_linear_messages.cpp index 0dfdb3d96f..b10557163b 100644 --- a/test/OpenMP/parallel_for_linear_messages.cpp +++ b/test/OpenMP/parallel_for_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; namespace X { @@ -120,7 +120,7 @@ template int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp parallel for linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) @@ -140,7 +140,7 @@ int foomain(I argc, C **argv) { #pragma omp parallel for linear(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp parallel for linear(argc : 5) +#pragma omp parallel for linear(argc, z : 5) for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for linear(S1) // expected-error {{'S1' does not refer to a value}} @@ -205,7 +205,7 @@ int main(int argc, char **argv) { S4 e(4); // expected-note {{'e' defined here}} S5 g(5); // expected-note {{'g' defined here}} - int i; + int i, z; int &j = i; #pragma omp parallel for linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) @@ -225,7 +225,7 @@ int main(int argc, char **argv) { #pragma omp parallel for linear(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp parallel for linear(argc) +#pragma omp parallel for linear(argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for linear(S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/parallel_for_loop_messages.cpp b/test/OpenMP/parallel_for_loop_messages.cpp index 12020c37a5..f1314943b3 100644 --- a/test/OpenMP/parallel_for_loop_messages.cpp +++ b/test/OpenMP/parallel_for_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized class S { int a; diff --git a/test/OpenMP/parallel_for_messages.cpp b/test/OpenMP/parallel_for_messages.cpp index f5aa6e6647..b53f6fa319 100644 --- a/test/OpenMP/parallel_for_messages.cpp +++ b/test/OpenMP/parallel_for_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/parallel_for_misc_messages.c b/test/OpenMP/parallel_for_misc_messages.c index 2d12ba4507..946f6d58cc 100644 --- a/test/OpenMP/parallel_for_misc_messages.c +++ b/test/OpenMP/parallel_for_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp parallel for'}} #pragma omp parallel for diff --git a/test/OpenMP/parallel_for_num_threads_messages.cpp b/test/OpenMP/parallel_for_num_threads_messages.cpp index 6f57d6e8f4..e689df8fc7 100644 --- a/test/OpenMP/parallel_for_num_threads_messages.cpp +++ b/test/OpenMP/parallel_for_num_threads_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} T tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp parallel for num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -32,7 +32,7 @@ T tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}} for (i = 0; i < argc; ++i) foo(); - #pragma omp parallel for num_threads (argc) + #pragma omp parallel for num_threads (argc+z) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}} for (i = 0; i < argc; ++i) foo(); @@ -41,7 +41,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp parallel for num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -50,7 +50,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}} + #pragma omp parallel for num_threads (z-argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }} for (i = 0; i < argc; ++i) foo(); diff --git a/test/OpenMP/parallel_for_ordered_messages.cpp b/test/OpenMP/parallel_for_ordered_messages.cpp index 9681d780fb..027e3b0797 100644 --- a/test/OpenMP/parallel_for_ordered_messages.cpp +++ b/test/OpenMP/parallel_for_ordered_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/parallel_for_private_messages.cpp b/test/OpenMP/parallel_for_private_messages.cpp index 4591043bbf..3f742600e1 100644 --- a/test/OpenMP/parallel_for_private_messages.cpp +++ b/test/OpenMP/parallel_for_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/test/OpenMP/parallel_for_proc_bind_messages.cpp b/test/OpenMP/parallel_for_proc_bind_messages.cpp index 0ffff89a8c..85c6982eef 100644 --- a/test/OpenMP/parallel_for_proc_bind_messages.cpp +++ b/test/OpenMP/parallel_for_proc_bind_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/test/OpenMP/parallel_for_reduction_messages.cpp b/test/OpenMP/parallel_for_reduction_messages.cpp index 87a5027f69..8035767517 100644 --- a/test/OpenMP/parallel_for_reduction_messages.cpp +++ b/test/OpenMP/parallel_for_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -92,7 +92,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -137,7 +137,7 @@ T tmain(T argc) { #pragma omp parallel for reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp parallel for reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} @@ -214,7 +214,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -259,7 +259,7 @@ int main(int argc, char **argv) { #pragma omp parallel for reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp parallel for reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} diff --git a/test/OpenMP/parallel_for_schedule_messages.cpp b/test/OpenMP/parallel_for_schedule_messages.cpp index dfdd36dddd..04fdad1732 100644 --- a/test/OpenMP/parallel_for_schedule_messages.cpp +++ b/test/OpenMP/parallel_for_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} T tmain(T argc, S **argv) { + T z; #pragma omp parallel for schedule // expected-error {{expected '(' after 'schedule'}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp parallel for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -35,7 +36,7 @@ T tmain(T argc, S **argv) { for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp parallel for schedule (dynamic, 1)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; - #pragma omp parallel for schedule (guided, (ST > 0) ? 1 + ST : 2) + #pragma omp parallel for schedule (guided, (ST > 0) ? 1 + ST : 2 + z) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+2 2 {{directive '#pragma omp parallel for' cannot contain more than one 'schedule' clause}} // expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}} @@ -56,6 +57,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp parallel for schedule // expected-error {{expected '(' after 'schedule'}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp parallel for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -74,7 +76,7 @@ int main(int argc, char **argv) { for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp parallel for schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; - #pragma omp parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2) + #pragma omp parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2 - z) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error@+2 2 {{directive '#pragma omp parallel for' cannot contain more than one 'schedule' clause}} // expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}} diff --git a/test/OpenMP/parallel_for_simd_aligned_messages.cpp b/test/OpenMP/parallel_for_simd_aligned_messages.cpp index 75f4adb00b..76c64de3fe 100644 --- a/test/OpenMP/parallel_for_simd_aligned_messages.cpp +++ b/test/OpenMP/parallel_for_simd_aligned_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct B { static int ib[20]; // expected-note 0 {{'B::ib' declared here}} diff --git a/test/OpenMP/parallel_for_simd_collapse_messages.cpp b/test/OpenMP/parallel_for_simd_collapse_messages.cpp index 39d01b8c2f..4b2c8b577b 100644 --- a/test/OpenMP/parallel_for_simd_collapse_messages.cpp +++ b/test/OpenMP/parallel_for_simd_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/parallel_for_simd_copyin_messages.cpp b/test/OpenMP/parallel_for_simd_copyin_messages.cpp index 6b492b13f7..5214fb91a9 100644 --- a/test/OpenMP/parallel_for_simd_copyin_messages.cpp +++ b/test/OpenMP/parallel_for_simd_copyin_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -o - %s +// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/parallel_for_simd_default_messages.cpp b/test/OpenMP/parallel_for_simd_default_messages.cpp index 7b30e4106a..570ee14bbc 100644 --- a/test/OpenMP/parallel_for_simd_default_messages.cpp +++ b/test/OpenMP/parallel_for_simd_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -o - %s +// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized void foo(); diff --git a/test/OpenMP/parallel_for_simd_firstprivate_messages.cpp b/test/OpenMP/parallel_for_simd_firstprivate_messages.cpp index ef3743bc79..2cd9c065c6 100644 --- a/test/OpenMP/parallel_for_simd_firstprivate_messages.cpp +++ b/test/OpenMP/parallel_for_simd_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -67,7 +67,7 @@ template int foomain(int argc, char **argv) { I e(4); C g(5); - int i; + int i, z; int &j = i; #pragma omp parallel for simd firstprivate // expected-error {{expected '(' after 'firstprivate'}} for (int k = 0; k < argc; ++k) @@ -102,7 +102,7 @@ int foomain(int argc, char **argv) { #pragma omp parallel for simd firstprivate(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp parallel for simd firstprivate(h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}} +#pragma omp parallel for simd firstprivate(h, z) // expected-error {{threadprivate or thread local variable cannot be firstprivate}} for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for simd linear(i) @@ -154,7 +154,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp parallel for simd firstprivate // expected-error {{expected '(' after 'firstprivate'}} for (i = 0; i < argc; ++i) @@ -174,7 +174,7 @@ int main(int argc, char **argv) { #pragma omp parallel for simd firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (i = 0; i < argc; ++i) foo(); -#pragma omp parallel for simd firstprivate(argc) +#pragma omp parallel for simd firstprivate(argc, z) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd firstprivate(S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/parallel_for_simd_if_messages.cpp b/test/OpenMP/parallel_for_simd_if_messages.cpp index 08f8b466ed..aa1e302d04 100644 --- a/test/OpenMP/parallel_for_simd_if_messages.cpp +++ b/test/OpenMP/parallel_for_simd_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp parallel for simd if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -34,7 +34,7 @@ int tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp parallel for simd if(argc) + #pragma omp parallel for simd if(argc + z) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd if(parallel // expected-error {{use of undeclared identifier 'parallel'}} expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); @@ -55,7 +55,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp parallel for simd if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -86,7 +86,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp parallel for simd if(parallel : argc) + #pragma omp parallel for simd if(parallel : argc / z) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd if(parallel : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp parallel for simd'}} for (i = 0; i < argc; ++i) foo(); diff --git a/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp b/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp index 45cc26b074..e47a6090b6 100644 --- a/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp +++ b/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -68,7 +68,7 @@ template int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} for (int k = 0; k < argc; ++k) @@ -100,7 +100,7 @@ int foomain(int argc, char **argv) { #pragma omp parallel for simd lastprivate(argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp parallel for simd lastprivate(e, g) // expected-error 2 {{calling a private constructor of class 'S4'}} +#pragma omp parallel for simd lastprivate(z, e, g) // expected-error 2 {{calling a private constructor of class 'S4'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for simd lastprivate(h) // expected-error {{threadprivate or thread local variable cannot be lastprivate}} @@ -145,7 +145,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} for (i = 0; i < argc; ++i) @@ -180,7 +180,7 @@ int main(int argc, char **argv) { #pragma omp parallel for simd lastprivate(2 * 2) // expected-error {{expected variable name}} for (i = 0; i < argc; ++i) foo(); -#pragma omp parallel for simd lastprivate(ba) +#pragma omp parallel for simd lastprivate(ba, z) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} diff --git a/test/OpenMP/parallel_for_simd_linear_messages.cpp b/test/OpenMP/parallel_for_simd_linear_messages.cpp index cf207f021a..5d6da8c940 100644 --- a/test/OpenMP/parallel_for_simd_linear_messages.cpp +++ b/test/OpenMP/parallel_for_simd_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; namespace X { @@ -104,7 +104,7 @@ S3 h; template int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp parallel for simd linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) ++k; @@ -132,7 +132,7 @@ template int foomain(I argc, C **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for simd linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}} for (int k = 0; k < argc; ++k) ++k; - #pragma omp parallel for simd linear(i) + #pragma omp parallel for simd linear(i, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel { @@ -168,7 +168,7 @@ int main(int argc, char **argv) { S4 e(4); // expected-note {{'e' defined here}} S5 g(5); // expected-note {{'g' defined here}} - int i; + int i, z; int &j = i; #pragma omp parallel for simd linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) ++k; @@ -182,13 +182,13 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for simd linear (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; - #pragma omp parallel for simd linear (argc) + #pragma omp parallel for simd linear (argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for simd linear (S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; // expected-error@+2 {{linear variable with incomplete type 'S1'}} // expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}} - #pragma omp parallel for simd linear (a, b) + #pragma omp parallel for simd linear (a, b) for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for simd linear (argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; diff --git a/test/OpenMP/parallel_for_simd_loop_messages.cpp b/test/OpenMP/parallel_for_simd_loop_messages.cpp index ba54cb2c09..d606f07e5b 100644 --- a/test/OpenMP/parallel_for_simd_loop_messages.cpp +++ b/test/OpenMP/parallel_for_simd_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized class S { int a; diff --git a/test/OpenMP/parallel_for_simd_messages.cpp b/test/OpenMP/parallel_for_simd_messages.cpp index 77b9b0851e..e0e7784131 100644 --- a/test/OpenMP/parallel_for_simd_messages.cpp +++ b/test/OpenMP/parallel_for_simd_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/parallel_for_simd_misc_messages.c b/test/OpenMP/parallel_for_simd_misc_messages.c index d3565bfa4f..2dd64d3155 100644 --- a/test/OpenMP/parallel_for_simd_misc_messages.c +++ b/test/OpenMP/parallel_for_simd_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp parallel for simd'}} #pragma omp parallel for simd diff --git a/test/OpenMP/parallel_for_simd_num_threads_messages.cpp b/test/OpenMP/parallel_for_simd_num_threads_messages.cpp index 06460c397d..f79ec4f68f 100644 --- a/test/OpenMP/parallel_for_simd_num_threads_messages.cpp +++ b/test/OpenMP/parallel_for_simd_num_threads_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} T tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -32,7 +32,7 @@ T tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}} for (i = 0; i < argc; ++i) foo(); - #pragma omp parallel for simd num_threads (argc) + #pragma omp parallel for simd num_threads (argc + z) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}} for (i = 0; i < argc; ++i) foo(); @@ -41,7 +41,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -50,7 +50,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for simd' are ignored}} + #pragma omp parallel for simd num_threads (argc * z)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for simd' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp parallel for simd num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }} for (i = 0; i < argc; ++i) foo(); diff --git a/test/OpenMP/parallel_for_simd_private_messages.cpp b/test/OpenMP/parallel_for_simd_private_messages.cpp index c5f853fc5d..40ea8ecdc1 100644 --- a/test/OpenMP/parallel_for_simd_private_messages.cpp +++ b/test/OpenMP/parallel_for_simd_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -97,7 +97,7 @@ template int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp parallel for simd private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) @@ -123,7 +123,7 @@ int foomain(I argc, C **argv) { #pragma omp parallel for simd private(S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp parallel for simd private(a, b) // expected-error {{private variable with incomplete type 'S1'}} +#pragma omp parallel for simd private(z, a, b) // expected-error {{private variable with incomplete type 'S1'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for simd private(argv[1]) // expected-error {{expected variable name}} @@ -172,7 +172,7 @@ int main(int argc, char **argv) { S5 g(5); S6 s6(0.0) , s6_0(1.0); S7 > s7(0.0) , s7_0(1.0); - int i; + int i, z; int &j = i; #pragma omp parallel for simd private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) @@ -192,7 +192,7 @@ int main(int argc, char **argv) { #pragma omp parallel for simd private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp parallel for simd private(argc) +#pragma omp parallel for simd private(argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel for simd private(S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/parallel_for_simd_proc_bind_messages.cpp b/test/OpenMP/parallel_for_simd_proc_bind_messages.cpp index 26cc729964..5e7a22e417 100644 --- a/test/OpenMP/parallel_for_simd_proc_bind_messages.cpp +++ b/test/OpenMP/parallel_for_simd_proc_bind_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -o - %s +// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized void foo(); diff --git a/test/OpenMP/parallel_for_simd_reduction_messages.cpp b/test/OpenMP/parallel_for_simd_reduction_messages.cpp index 5586a8b864..4c2e5978b2 100644 --- a/test/OpenMP/parallel_for_simd_reduction_messages.cpp +++ b/test/OpenMP/parallel_for_simd_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -86,7 +86,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -131,7 +131,7 @@ T tmain(T argc) { #pragma omp parallel for simd reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp parallel for simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} @@ -208,7 +208,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -247,7 +247,7 @@ int main(int argc, char **argv) { #pragma omp parallel for simd reduction(~ : argc) // expected-error {{expected unqualified-id}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp parallel for simd reduction(&& : argc) +#pragma omp parallel for simd reduction(&& : argc, z) for (int i = 0; i < 10; ++i) foo(); #pragma omp parallel for simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/parallel_for_simd_safelen_messages.cpp b/test/OpenMP/parallel_for_simd_safelen_messages.cpp index 939a1dafb3..b0951de662 100644 --- a/test/OpenMP/parallel_for_simd_safelen_messages.cpp +++ b/test/OpenMP/parallel_for_simd_safelen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/parallel_for_simd_schedule_messages.cpp b/test/OpenMP/parallel_for_simd_schedule_messages.cpp index 29e46a7a0c..5a1e9b9139 100644 --- a/test/OpenMP/parallel_for_simd_schedule_messages.cpp +++ b/test/OpenMP/parallel_for_simd_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} T tmain(T argc, S **argv) { + T k; #pragma omp parallel for simd schedule // expected-error {{expected '(' after 'schedule'}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp parallel for simd schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -46,7 +47,7 @@ T tmain(T argc, S **argv) { // expected-error@+1 2 {{expression must have integral or unscoped enumeration type, not 'char *'}} #pragma omp parallel for simd schedule (guided, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; - #pragma omp parallel for simd schedule (dynamic, 1) + #pragma omp parallel for simd schedule (dynamic, k) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp parallel for simd schedule (static, N) // expected-error {{argument to 'schedule' clause must be a strictly positive integer value}} for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; @@ -54,6 +55,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int k; #pragma omp parallel for simd schedule // expected-error {{expected '(' after 'schedule'}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp parallel for simd schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -68,7 +70,7 @@ int main(int argc, char **argv) { for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp parallel for simd schedule (runtime, 3) // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; - #pragma omp parallel for simd schedule (guided, 4 // expected-error {{expected ')'}} expected-note {{to match this '('}} + #pragma omp parallel for simd schedule (guided, k // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp parallel for simd schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for simd' are ignored}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; diff --git a/test/OpenMP/parallel_for_simd_simdlen_messages.cpp b/test/OpenMP/parallel_for_simd_simdlen_messages.cpp index 8cf196bf71..29a340e52f 100644 --- a/test/OpenMP/parallel_for_simd_simdlen_messages.cpp +++ b/test/OpenMP/parallel_for_simd_simdlen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/parallel_if_messages.cpp b/test/OpenMP/parallel_if_messages.cpp index d0a4c6d110..7f802a9e42 100644 --- a/test/OpenMP/parallel_if_messages.cpp +++ b/test/OpenMP/parallel_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,12 +13,13 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp parallel if // expected-error {{expected '(' after 'if'}} #pragma omp parallel if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp parallel if () // expected-error {{expected expression}} #pragma omp parallel if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp parallel if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}} - #pragma omp parallel if (argc > 0 ? argv[1] : argv[2]) + #pragma omp parallel if (argc > 0 ? argv[1] : argv[2] + z) #pragma omp parallel if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp parallel' cannot contain more than one 'if' clause}} #pragma omp parallel if (S) // expected-error {{'S' does not refer to a value}} #pragma omp parallel if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -37,6 +38,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { +int z; #pragma omp parallel if // expected-error {{expected '(' after 'if'}} #pragma omp parallel if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp parallel if () // expected-error {{expected expression}} @@ -52,7 +54,7 @@ int main(int argc, char **argv) { #pragma omp parallel if(parallel // expected-error {{use of undeclared identifier 'parallel'}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp parallel if(parallel : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp parallel if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} - #pragma omp parallel if(parallel : argc) + #pragma omp parallel if(parallel : argc>> z) #pragma omp parallel if(parallel : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp parallel'}} #pragma omp parallel if(parallel : argc) if (parallel:argc) // expected-error {{directive '#pragma omp parallel' cannot contain more than one 'if' clause with 'parallel' name modifier}} #pragma omp parallel if(parallel : argc) if (argc) // expected-error {{no more 'if' clause is allowed}} expected-note {{previous clause with directive name modifier specified here}} diff --git a/test/OpenMP/parallel_messages.cpp b/test/OpenMP/parallel_messages.cpp index c32e8c895a..6012487562 100644 --- a/test/OpenMP/parallel_messages.cpp +++ b/test/OpenMP/parallel_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/parallel_num_threads_messages.cpp b/test/OpenMP/parallel_num_threads_messages.cpp index 310e7ccfa4..0e50c7e1eb 100644 --- a/test/OpenMP/parallel_num_threads_messages.cpp +++ b/test/OpenMP/parallel_num_threads_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -15,6 +15,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} T tmain(T argc, S **argv) { + T z; #pragma omp parallel num_threads // expected-error {{expected '(' after 'num_threads'}} #pragma omp parallel num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp parallel num_threads () // expected-error {{expected expression}} @@ -24,7 +25,7 @@ T tmain(T argc, S **argv) { #pragma omp parallel num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}} #pragma omp parallel num_threads (S) // expected-error {{'S' does not refer to a value}} #pragma omp parallel num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}} - #pragma omp parallel num_threads (argc) + #pragma omp parallel num_threads (argc+z) #pragma omp parallel num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}} #pragma omp parallel redef_num_threads (argc, argc) foo(); @@ -33,11 +34,12 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { +int z; #pragma omp parallel num_threads // expected-error {{expected '(' after 'num_threads'}} #pragma omp parallel num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp parallel num_threads () // expected-error {{expected expression}} #pragma omp parallel num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} - #pragma omp parallel num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}} + #pragma omp parallel num_threads (z+argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}} #pragma omp parallel num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }} #pragma omp parallel num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}} #pragma omp parallel num_threads (S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/parallel_private_messages.cpp b/test/OpenMP/parallel_private_messages.cpp index e210493741..08b4175a1e 100644 --- a/test/OpenMP/parallel_private_messages.cpp +++ b/test/OpenMP/parallel_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -57,7 +57,7 @@ int main(int argc, char **argv) { const int da[5] = { 0 }; // expected-note {{'da' defined here}} S4 e(4); S5 g[] = {5, 6}; - int i; + int i, z; int &j = i; #pragma omp parallel private // expected-error {{expected '(' after 'private'}} #pragma omp parallel private ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -79,7 +79,7 @@ int main(int argc, char **argv) { foo(); #pragma omp parallel firstprivate(i) private(i) // expected-error {{firstprivate variable cannot be private}} expected-note {{defined as firstprivate}} foo(); - #pragma omp parallel private(i) + #pragma omp parallel private(i, z) #pragma omp parallel private(j) foo(); #pragma omp parallel firstprivate(i) diff --git a/test/OpenMP/parallel_proc_bind_messages.cpp b/test/OpenMP/parallel_proc_bind_messages.cpp index 91be0f1a8d..5639bd184e 100644 --- a/test/OpenMP/parallel_proc_bind_messages.cpp +++ b/test/OpenMP/parallel_proc_bind_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/test/OpenMP/parallel_reduction_messages.cpp b/test/OpenMP/parallel_reduction_messages.cpp index 2e90b63e0d..cb0ba7cf71 100644 --- a/test/OpenMP/parallel_reduction_messages.cpp +++ b/test/OpenMP/parallel_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -85,7 +85,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -117,7 +117,7 @@ T tmain(T argc) { foo(); #pragma omp parallel reduction(^ : T) // expected-error {{'T' does not refer to a value}} foo(); -#pragma omp parallel reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp parallel reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} foo(); #pragma omp parallel reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} foo(); @@ -180,7 +180,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -208,7 +208,7 @@ int main(int argc, char **argv) { foo(); #pragma omp parallel reduction(~ : argc) // expected-error {{expected unqualified-id}} foo(); -#pragma omp parallel reduction(&& : argc) +#pragma omp parallel reduction(&& : argc, z) foo(); #pragma omp parallel reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} foo(); diff --git a/test/OpenMP/parallel_sections_copyin_messages.cpp b/test/OpenMP/parallel_sections_copyin_messages.cpp index da0ef5cb1e..725e6ee932 100644 --- a/test/OpenMP/parallel_sections_copyin_messages.cpp +++ b/test/OpenMP/parallel_sections_copyin_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/parallel_sections_default_messages.cpp b/test/OpenMP/parallel_sections_default_messages.cpp index 3d2e74933f..d6a10fe56b 100644 --- a/test/OpenMP/parallel_sections_default_messages.cpp +++ b/test/OpenMP/parallel_sections_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/test/OpenMP/parallel_sections_firstprivate_messages.cpp b/test/OpenMP/parallel_sections_firstprivate_messages.cpp index c161e6f747..f07a720695 100644 --- a/test/OpenMP/parallel_sections_firstprivate_messages.cpp +++ b/test/OpenMP/parallel_sections_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -67,7 +67,7 @@ template int foomain(int argc, char **argv) { I e(4); C g(5); - int i; + int i, z; int &j = i; #pragma omp parallel sections firstprivate // expected-error {{expected '(' after 'firstprivate'}} { @@ -101,7 +101,7 @@ int foomain(int argc, char **argv) { { foo(); } -#pragma omp parallel sections firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} +#pragma omp parallel sections firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} { foo(); } @@ -173,7 +173,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp parallel sections firstprivate // expected-error {{expected '(' after 'firstprivate'}} { @@ -199,7 +199,7 @@ int main(int argc, char **argv) { { foo(); } -#pragma omp parallel sections firstprivate(argc) +#pragma omp parallel sections firstprivate(argc, z) { foo(); } diff --git a/test/OpenMP/parallel_sections_if_messages.cpp b/test/OpenMP/parallel_sections_if_messages.cpp index b03ed35516..8d36b6d5d3 100644 --- a/test/OpenMP/parallel_sections_if_messages.cpp +++ b/test/OpenMP/parallel_sections_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp parallel sections if // expected-error {{expected '(' after 'if'}} { foo(); @@ -53,7 +54,7 @@ int tmain(T argc, S **argv) { { foo(); } - #pragma omp parallel sections if(argc) + #pragma omp parallel sections if(argc + z) { foo(); } @@ -86,6 +87,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp parallel sections if // expected-error {{expected '(' after 'if'}} { foo(); @@ -106,7 +108,7 @@ int main(int argc, char **argv) { { foo(); } - #pragma omp parallel sections if (argc > 0 ? argv[1] : argv[2]) + #pragma omp parallel sections if (argc > 0 ? argv[1] : argv[2] + z) { foo(); } diff --git a/test/OpenMP/parallel_sections_lastprivate_messages.cpp b/test/OpenMP/parallel_sections_lastprivate_messages.cpp index b259b8a19e..5f3a2e7244 100644 --- a/test/OpenMP/parallel_sections_lastprivate_messages.cpp +++ b/test/OpenMP/parallel_sections_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/test/OpenMP/parallel_sections_messages.cpp b/test/OpenMP/parallel_sections_messages.cpp index 81f0c517cd..ab4c34a6b2 100644 --- a/test/OpenMP/parallel_sections_messages.cpp +++ b/test/OpenMP/parallel_sections_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/parallel_sections_misc_messages.c b/test/OpenMP/parallel_sections_misc_messages.c index 780837a15f..0264cd6dd6 100644 --- a/test/OpenMP/parallel_sections_misc_messages.c +++ b/test/OpenMP/parallel_sections_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized void foo(); diff --git a/test/OpenMP/parallel_sections_num_threads_messages.cpp b/test/OpenMP/parallel_sections_num_threads_messages.cpp index 42bdee25e4..31434e4757 100644 --- a/test/OpenMP/parallel_sections_num_threads_messages.cpp +++ b/test/OpenMP/parallel_sections_num_threads_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} T tmain(T argc, S **argv) { + T z; #pragma omp parallel sections num_threads // expected-error {{expected '(' after 'num_threads'}} {foo();} #pragma omp parallel sections num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -31,7 +32,7 @@ T tmain(T argc, S **argv) { {foo();} #pragma omp parallel sections num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}} {foo();} - #pragma omp parallel sections num_threads (argc) + #pragma omp parallel sections num_threads (argc + z) {foo();} #pragma omp parallel sections num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}} {foo();} @@ -40,6 +41,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp parallel sections num_threads // expected-error {{expected '(' after 'num_threads'}} {foo();} #pragma omp parallel sections num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -48,7 +50,7 @@ int main(int argc, char **argv) { {foo();} #pragma omp parallel sections num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} {foo();} - #pragma omp parallel sections num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel sections' are ignored}} + #pragma omp parallel sections num_threads (argc / z)) // expected-warning {{extra tokens at the end of '#pragma omp parallel sections' are ignored}} {foo();} #pragma omp parallel sections num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }} {foo();} diff --git a/test/OpenMP/parallel_sections_private_messages.cpp b/test/OpenMP/parallel_sections_private_messages.cpp index 2161df33d8..7e9a6e41b7 100644 --- a/test/OpenMP/parallel_sections_private_messages.cpp +++ b/test/OpenMP/parallel_sections_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -109,7 +109,7 @@ template int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp parallel sections private // expected-error {{expected '(' after 'private'}} { @@ -151,7 +151,7 @@ int foomain(I argc, C **argv) { { foo(); } -#pragma omp parallel sections private(e, g) +#pragma omp parallel sections private(e, g, z) { foo(); } @@ -199,7 +199,7 @@ int main(int argc, char **argv) { S5 g(5); S6 s6(0.0) , s6_0(1.0); S7 > s7(0.0) , s7_0(1.0); - int i; + int i, z; int &j = i; #pragma omp parallel sections private // expected-error {{expected '(' after 'private'}} { @@ -225,7 +225,7 @@ int main(int argc, char **argv) { { foo(); } -#pragma omp parallel sections private(argc) +#pragma omp parallel sections private(argc, z) { foo(); } diff --git a/test/OpenMP/parallel_sections_proc_bind_messages.cpp b/test/OpenMP/parallel_sections_proc_bind_messages.cpp index bb173b61e5..81e9c75e89 100644 --- a/test/OpenMP/parallel_sections_proc_bind_messages.cpp +++ b/test/OpenMP/parallel_sections_proc_bind_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/test/OpenMP/parallel_sections_reduction_messages.cpp b/test/OpenMP/parallel_sections_reduction_messages.cpp index ac205cd076..72aa9d4dde 100644 --- a/test/OpenMP/parallel_sections_reduction_messages.cpp +++ b/test/OpenMP/parallel_sections_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -87,7 +87,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -145,7 +145,7 @@ T tmain(T argc) { { foo(); } -#pragma omp parallel sections reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp parallel sections reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} { foo(); } @@ -240,7 +240,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -342,7 +342,7 @@ int main(int argc, char **argv) { { foo(); } -#pragma omp parallel sections reduction(+ : o) // expected-error {{no viable overloaded '='}} +#pragma omp parallel sections reduction(+ : o, z) // expected-error {{no viable overloaded '='}} { foo(); } diff --git a/test/OpenMP/parallel_sections_shared_messages.cpp b/test/OpenMP/parallel_sections_shared_messages.cpp index 1ab923c330..554c6e2286 100644 --- a/test/OpenMP/parallel_sections_shared_messages.cpp +++ b/test/OpenMP/parallel_sections_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -63,7 +63,7 @@ int main(int argc, char **argv) { const int da[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, k; int &j = i; #pragma omp parallel sections shared // expected-error {{expected '(' after 'shared'}} { foo(); } @@ -81,7 +81,7 @@ int main(int argc, char **argv) { { foo(); } #pragma omp parallel sections shared(S1) // expected-error {{'S1' does not refer to a value}} { foo(); } -#pragma omp parallel sections shared(a, b, c, d, f) +#pragma omp parallel sections shared(a, b, c, d, f, k) { foo(); } #pragma omp parallel sections shared(argv[1]) // expected-error {{expected variable name}} { foo(); } diff --git a/test/OpenMP/parallel_shared_messages.cpp b/test/OpenMP/parallel_shared_messages.cpp index 915b6a2cfc..0869f16913 100644 --- a/test/OpenMP/parallel_shared_messages.cpp +++ b/test/OpenMP/parallel_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -59,7 +59,7 @@ int main(int argc, char **argv) { const int da[5] = { 0 }; S4 e(4); S5 g(5); - int i; + int i, k; int &j = i; #pragma omp parallel shared // expected-error {{expected '(' after 'shared'}} #pragma omp parallel shared ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -69,7 +69,7 @@ int main(int argc, char **argv) { #pragma omp parallel shared (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} #pragma omp parallel shared (argc) #pragma omp parallel shared (S1) // expected-error {{'S1' does not refer to a value}} - #pragma omp parallel shared (a, b, c, d, f) + #pragma omp parallel shared (a, b, c, d, f, k) #pragma omp parallel shared (argv[1]) // expected-error {{expected variable name}} #pragma omp parallel shared(ba) #pragma omp parallel shared(ca) diff --git a/test/OpenMP/requires_messages.cpp b/test/OpenMP/requires_messages.cpp index edc98f1a14..72a6c50229 100644 --- a/test/OpenMP/requires_messages.cpp +++ b/test/OpenMP/requires_messages.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized int a; #pragma omp requires unified_address allocate(a) // expected-note {{unified_address clause previously used here}} expected-note {{unified_address clause previously used here}} expected-note {{unified_address clause previously used here}} expected-note {{unified_address clause previously used here}} expected-note {{unified_address clause previously used here}} expected-note{{unified_address clause previously used here}} expected-error {{unexpected OpenMP clause 'allocate' in directive '#pragma omp requires'}} diff --git a/test/OpenMP/sections_firstprivate_messages.cpp b/test/OpenMP/sections_firstprivate_messages.cpp index e2d9de3c31..1b595f483c 100644 --- a/test/OpenMP/sections_firstprivate_messages.cpp +++ b/test/OpenMP/sections_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -67,7 +67,7 @@ template int foomain(int argc, char **argv) { I e(4); C g(5); - int i; + int i, z; int &j = i; #pragma omp parallel #pragma omp sections firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -110,7 +110,7 @@ int foomain(int argc, char **argv) { foo(); } #pragma omp parallel -#pragma omp sections firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} +#pragma omp sections firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} { foo(); } @@ -188,7 +188,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp parallel #pragma omp sections firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -221,7 +221,7 @@ int main(int argc, char **argv) { foo(); } #pragma omp parallel -#pragma omp sections firstprivate(argc) +#pragma omp sections firstprivate(argc, z) { foo(); } diff --git a/test/OpenMP/sections_lastprivate_messages.cpp b/test/OpenMP/sections_lastprivate_messages.cpp index f7e0d1acf0..37a0100bf6 100644 --- a/test/OpenMP/sections_lastprivate_messages.cpp +++ b/test/OpenMP/sections_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -68,7 +68,7 @@ template int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, k; int &j = i; #pragma omp parallel #pragma omp sections lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -111,7 +111,7 @@ int foomain(int argc, char **argv) { foo(); } #pragma omp parallel -#pragma omp sections lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} +#pragma omp sections lastprivate(a, b, k) // expected-error {{lastprivate variable with incomplete type 'S1'}} { foo(); } @@ -174,7 +174,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, k; int &j = i; #pragma omp parallel #pragma omp sections lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -232,7 +232,7 @@ int main(int argc, char **argv) { foo(); } #pragma omp parallel -#pragma omp sections lastprivate(ba) +#pragma omp sections lastprivate(ba, k) { foo(); } diff --git a/test/OpenMP/sections_misc_messages.c b/test/OpenMP/sections_misc_messages.c index ba030859e5..8d8dab86a3 100644 --- a/test/OpenMP/sections_misc_messages.c +++ b/test/OpenMP/sections_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized void foo(); diff --git a/test/OpenMP/sections_private_messages.cpp b/test/OpenMP/sections_private_messages.cpp index 3548590b0f..e032c7a5ec 100644 --- a/test/OpenMP/sections_private_messages.cpp +++ b/test/OpenMP/sections_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/test/OpenMP/sections_reduction_messages.cpp b/test/OpenMP/sections_reduction_messages.cpp index e0b285cbaf..8b1c1f1abb 100644 --- a/test/OpenMP/sections_reduction_messages.cpp +++ b/test/OpenMP/sections_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -88,7 +88,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -210,7 +210,7 @@ T tmain(T argc) { foo(); } #pragma omp parallel -#pragma omp sections reduction(+ : o) // expected-error 2 {{no viable overloaded '='}} +#pragma omp sections reduction(+ : o, z) // expected-error 2 {{no viable overloaded '='}} { foo(); } @@ -268,7 +268,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -330,7 +330,7 @@ int main(int argc, char **argv) { foo(); } #pragma omp parallel -#pragma omp sections reduction(&& : argc) +#pragma omp sections reduction(&& : argc, z) { foo(); } diff --git a/test/OpenMP/simd_aligned_messages.cpp b/test/OpenMP/simd_aligned_messages.cpp index 7621d7de09..44679b3373 100644 --- a/test/OpenMP/simd_aligned_messages.cpp +++ b/test/OpenMP/simd_aligned_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct B { static int ib[20]; // expected-note 0 {{'B::ib' declared here}} diff --git a/test/OpenMP/simd_collapse_messages.cpp b/test/OpenMP/simd_collapse_messages.cpp index 3e980d9492..978ae29fca 100644 --- a/test/OpenMP/simd_collapse_messages.cpp +++ b/test/OpenMP/simd_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/simd_lastprivate_messages.cpp b/test/OpenMP/simd_lastprivate_messages.cpp index 9469c53b74..e9171af2eb 100644 --- a/test/OpenMP/simd_lastprivate_messages.cpp +++ b/test/OpenMP/simd_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/test/OpenMP/simd_linear_messages.cpp b/test/OpenMP/simd_linear_messages.cpp index fa2690616c..964439277b 100644 --- a/test/OpenMP/simd_linear_messages.cpp +++ b/test/OpenMP/simd_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; namespace X { @@ -104,7 +104,7 @@ S3 h; template int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp simd linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) ++k; @@ -140,7 +140,7 @@ template int foomain(I argc, C **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp simd linear(ref(e, g)) // expected-error 2 {{variable of non-reference type 'int' can be used only with 'val' modifier, but used with 'ref'}} for (int k = 0; k < argc; ++k) ++k; - #pragma omp simd linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}} + #pragma omp simd linear(h, z) // expected-error {{threadprivate or thread local variable cannot be linear}} for (int k = 0; k < argc; ++k) ++k; #pragma omp simd linear(uval(i)) // expected-error {{variable of non-reference type 'int' can be used only with 'val' modifier, but used with 'uval'}} for (int k = 0; k < argc; ++k) ++k; @@ -195,7 +195,7 @@ int main(int argc, char **argv) { S4 e(4); // expected-note {{'e' defined here}} S5 g(5); // expected-note {{'g' defined here}} - int i; + int i, z; int &j = i; #pragma omp simd linear(f) linear(f) // expected-error {{linear variable cannot be linear}} expected-note {{defined as linear}} for (int k = 0; k < argc; ++k) ++k; @@ -223,7 +223,7 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; // expected-error@+2 {{linear variable with incomplete type 'S1'}} // expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S2'}} - #pragma omp simd linear(a, b) + #pragma omp simd linear(a, b, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp simd linear (argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; diff --git a/test/OpenMP/simd_loop_messages.cpp b/test/OpenMP/simd_loop_messages.cpp index 975cd7f90f..7a3bdedac9 100644 --- a/test/OpenMP/simd_loop_messages.cpp +++ b/test/OpenMP/simd_loop_messages.cpp @@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -fopenmp-version=50 -DOMP50 -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -fopenmp-version=50 -DOMP50 +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -fopenmp-version=50 -DOMP50 -Wuninitialized +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -fopenmp-version=50 -DOMP50 -Wuninitialized static int sii; // expected-note@+1 {{defined as threadprivate or thread local}} diff --git a/test/OpenMP/simd_misc_messages.c b/test/OpenMP/simd_misc_messages.c index 75b8ce0596..1fbb6fa263 100644 --- a/test/OpenMP/simd_misc_messages.c +++ b/test/OpenMP/simd_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp simd'}} #pragma omp simd diff --git a/test/OpenMP/simd_private_messages.cpp b/test/OpenMP/simd_private_messages.cpp index 99f76ceed5..12927b07d1 100644 --- a/test/OpenMP/simd_private_messages.cpp +++ b/test/OpenMP/simd_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/test/OpenMP/simd_reduction_messages.cpp b/test/OpenMP/simd_reduction_messages.cpp index f204ae1608..8e2503331b 100644 --- a/test/OpenMP/simd_reduction_messages.cpp +++ b/test/OpenMP/simd_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -86,7 +86,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -131,7 +131,7 @@ T tmain(T argc) { #pragma omp simd reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} @@ -211,7 +211,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -250,7 +250,7 @@ int main(int argc, char **argv) { #pragma omp simd reduction(~ : argc) // expected-error {{expected unqualified-id}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp simd reduction(&& : argc) +#pragma omp simd reduction(&& : argc, z) for (int i = 0; i < 10; ++i) foo(); #pragma omp simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/simd_safelen_messages.cpp b/test/OpenMP/simd_safelen_messages.cpp index f40873aeea..7a557781a7 100644 --- a/test/OpenMP/simd_safelen_messages.cpp +++ b/test/OpenMP/simd_safelen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/simd_simdlen_messages.cpp b/test/OpenMP/simd_simdlen_messages.cpp index 27ab4acf77..0b7b800c26 100644 --- a/test/OpenMP/simd_simdlen_messages.cpp +++ b/test/OpenMP/simd_simdlen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/single_copyprivate_messages.cpp b/test/OpenMP/single_copyprivate_messages.cpp index bb18568d0f..1dc508b01b 100644 --- a/test/OpenMP/single_copyprivate_messages.cpp +++ b/test/OpenMP/single_copyprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -45,8 +45,10 @@ S5 m(4); template T tmain(T argc, C **argv) { - T i; + T i, z; static T TA; +#pragma omp single copyprivate(z) + ; #pragma omp parallel #pragma omp single copyprivate // expected-error {{expected '(' after 'copyprivate'}} #pragma omp parallel @@ -121,7 +123,7 @@ using A::x; } int main(int argc, char **argv) { - int i; + int i, z; static int intA; #pragma omp parallel #pragma omp single copyprivate // expected-error {{expected '(' after 'copyprivate'}} @@ -146,9 +148,9 @@ int main(int argc, char **argv) { #pragma omp parallel #pragma omp single copyprivate(m) // expected-error {{'operator=' is a private member of 'S5'}} foo(); -#pragma omp parallel private(i) +#pragma omp parallel private(i, z) { -#pragma omp single copyprivate(i) +#pragma omp single copyprivate(i, z) foo(); } #pragma omp parallel shared(i) // expected-note {{defined as shared}} diff --git a/test/OpenMP/single_firstprivate_messages.cpp b/test/OpenMP/single_firstprivate_messages.cpp index cff4b9013b..d97be2ab9b 100644 --- a/test/OpenMP/single_firstprivate_messages.cpp +++ b/test/OpenMP/single_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -67,7 +67,7 @@ template int foomain(int argc, char **argv) { I e(4); C g(5); - int i; + int i, z; int &j = i; #pragma omp parallel #pragma omp single firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -94,7 +94,7 @@ int foomain(int argc, char **argv) { #pragma omp single firstprivate(S1) // expected-error {{'S1' does not refer to a value}} foo(); #pragma omp parallel -#pragma omp single firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} +#pragma omp single firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} foo(); #pragma omp parallel #pragma omp single firstprivate(argv[1]) // expected-error {{expected variable name}} @@ -150,7 +150,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp parallel #pragma omp single firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -171,7 +171,7 @@ int main(int argc, char **argv) { #pragma omp single firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} foo(); #pragma omp parallel -#pragma omp single firstprivate(argc) +#pragma omp single firstprivate(argc, z) foo(); #pragma omp parallel #pragma omp single firstprivate(S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/single_misc_messages.c b/test/OpenMP/single_misc_messages.c index b826419807..0d4ab5a77b 100644 --- a/test/OpenMP/single_misc_messages.c +++ b/test/OpenMP/single_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized void foo(); diff --git a/test/OpenMP/single_private_messages.cpp b/test/OpenMP/single_private_messages.cpp index 6ae2a385a3..e809f0732a 100644 --- a/test/OpenMP/single_private_messages.cpp +++ b/test/OpenMP/single_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/test/OpenMP/target_data_device_messages.cpp b/test/OpenMP/target_data_device_messages.cpp index 51c809a865..873402d372 100644 --- a/test/OpenMP/target_data_device_messages.cpp +++ b/test/OpenMP/target_data_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -12,14 +12,14 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { - int a; + int a, z; #pragma omp target data map(to: a) device // expected-error {{expected '(' after 'device'}} #pragma omp target data map(to: a) device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target data map(to: a) device () // expected-error {{expected expression}} #pragma omp target data map(to: a) device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target data map(to: a) device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target data' are ignored}} #pragma omp target data map(to: a) device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} - #pragma omp target data map(to: a) device (argc + argc) + #pragma omp target data map(to: a) device (argc + argc + z) #pragma omp target data map(to: a) device (argc), device (argc+1) // expected-error {{directive '#pragma omp target data' cannot contain more than one 'device' clause}} #pragma omp target data map(to: a) device (S1) // expected-error {{'S1' does not refer to a value}} #pragma omp target data map(to: a) device (-2) // expected-error {{argument to 'device' clause must be a non-negative integer value}} diff --git a/test/OpenMP/target_data_if_messages.cpp b/test/OpenMP/target_data_if_messages.cpp index ae68d252a8..c6f9b4b34e 100644 --- a/test/OpenMP/target_data_if_messages.cpp +++ b/test/OpenMP/target_data_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -12,14 +12,14 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { - int a; + int a, z; #pragma omp target data map(to: a) if // expected-error {{expected '(' after 'if'}} #pragma omp target data map(to: a) if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target data map(to: a) if () // expected-error {{expected expression}} #pragma omp target data map(to: a) if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target data map(to: a) if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target data' are ignored}} #pragma omp target data map(to: a) if (argc > 0 ? argv[1] : argv[2]) - #pragma omp target data map(to: a) if (argc + argc) + #pragma omp target data map(to: a) if (argc + argc + z) #pragma omp target data map(to: a) if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp target data' cannot contain more than one 'if' clause}} #pragma omp target data map(to: a) if (S1) // expected-error {{'S1' does not refer to a value}} #pragma omp target data map(to: a) if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} diff --git a/test/OpenMP/target_data_messages.c b/test/OpenMP/target_data_messages.c index 936e3eaa64..9497ddba02 100644 --- a/test/OpenMP/target_data_messages.c +++ b/test/OpenMP/target_data_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_data_use_device_ptr_messages.cpp b/test/OpenMP/target_data_use_device_ptr_messages.cpp index 87f23e2de7..6ce6f9db7d 100644 --- a/test/OpenMP/target_data_use_device_ptr_messages.cpp +++ b/test/OpenMP/target_data_use_device_ptr_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s -Wuninitialized -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s -Wuninitialized struct ST { int *a; }; diff --git a/test/OpenMP/target_defaultmap_messages.cpp b/test/OpenMP/target_defaultmap_messages.cpp index 27079c3028..0676753d6a 100644 --- a/test/OpenMP/target_defaultmap_messages.cpp +++ b/test/OpenMP/target_defaultmap_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_depend_messages.cpp b/test/OpenMP/target_depend_messages.cpp index d699080545..a7ac1760e6 100644 --- a/test/OpenMP/target_depend_messages.cpp +++ b/test/OpenMP/target_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_device_messages.cpp b/test/OpenMP/target_device_messages.cpp index 8cf19b2597..8a583e9f3b 100644 --- a/test/OpenMP/target_device_messages.cpp +++ b/test/OpenMP/target_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -12,6 +12,7 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { + int z; #pragma omp target device // expected-error {{expected '(' after 'device'}} foo(); #pragma omp target device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -20,7 +21,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} foo(); - #pragma omp target device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target' are ignored}} + #pragma omp target device (z-argc)) // expected-warning {{extra tokens at the end of '#pragma omp target' are ignored}} foo(); #pragma omp target device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} foo(); diff --git a/test/OpenMP/target_enter_data_depend_messages.cpp b/test/OpenMP/target_enter_data_depend_messages.cpp index c9a0d7ab3c..49dddfcc7c 100644 --- a/test/OpenMP/target_enter_data_depend_messages.cpp +++ b/test/OpenMP/target_enter_data_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_enter_data_device_messages.cpp b/test/OpenMP/target_enter_data_device_messages.cpp index de8405b4a6..a233a47152 100644 --- a/test/OpenMP/target_enter_data_device_messages.cpp +++ b/test/OpenMP/target_enter_data_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -12,14 +12,14 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target enter data map(to: i) device // expected-error {{expected '(' after 'device'}} #pragma omp target enter data map(to: i) device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target enter data map(to: i) device () // expected-error {{expected expression}} #pragma omp target enter data map(to: i) device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target enter data map(to: i) device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target enter data' are ignored}} #pragma omp target enter data map(to: i) device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} - #pragma omp target enter data map(to: i) device (argc + argc) + #pragma omp target enter data map(to: i) device (argc +z + argc ) #pragma omp target enter data map(to: i) device (argc), device (argc+1) // expected-error {{directive '#pragma omp target enter data' cannot contain more than one 'device' clause}} #pragma omp target enter data map(to: i) device (S1) // expected-error {{'S1' does not refer to a value}} #pragma omp target enter data map(to: i) device (-2) // expected-error {{argument to 'device' clause must be a non-negative integer value}} diff --git a/test/OpenMP/target_enter_data_if_messages.cpp b/test/OpenMP/target_enter_data_if_messages.cpp index 26404a5d97..5123d607dc 100644 --- a/test/OpenMP/target_enter_data_if_messages.cpp +++ b/test/OpenMP/target_enter_data_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -12,7 +12,7 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target enter data map(to: i) if // expected-error {{expected '(' after 'if'}} #pragma omp target enter data map(to: i) if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target enter data map(to: i) if () // expected-error {{expected expression}} @@ -27,7 +27,7 @@ int main(int argc, char **argv) { #pragma omp target enter data map(to: i) if(target enter data : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target enter data map(to: i) if(target enter data : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target enter data map(to: i) if(target enter data : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} - #pragma omp target enter data map(to: i) if(target enter data : argc) + #pragma omp target enter data map(to: i) if(target enter data : argc + z) #pragma omp target enter data map(to: i) if(target enter data : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target enter data'}} #pragma omp target enter data map(to: i) if(target enter data : argc) if (target enter data:argc) // expected-error {{directive '#pragma omp target enter data' cannot contain more than one 'if' clause with 'target enter data' name modifier}} #pragma omp target enter data map(to: i) if(target enter data : argc) if (argc) // expected-error {{no more 'if' clause is allowed}} expected-note {{previous clause with directive name modifier specified here}} diff --git a/test/OpenMP/target_enter_data_map_messages.c b/test/OpenMP/target_enter_data_map_messages.c index 7d03fcfa9a..cd082c63f8 100644 --- a/test/OpenMP/target_enter_data_map_messages.c +++ b/test/OpenMP/target_enter_data_map_messages.c @@ -1,8 +1,8 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - -x c++ %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - -x c++ %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - -x c++ %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - -x c++ %s -Wuninitialized int main(int argc, char **argv) { diff --git a/test/OpenMP/target_enter_data_nowait_messages.cpp b/test/OpenMP/target_enter_data_nowait_messages.cpp index 6f59c5ceb7..3f5dde00b8 100644 --- a/test/OpenMP/target_enter_data_nowait_messages.cpp +++ b/test/OpenMP/target_enter_data_nowait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized int main(int argc, char **argv) { int i; diff --git a/test/OpenMP/target_exit_data_depend_messages.cpp b/test/OpenMP/target_exit_data_depend_messages.cpp index 07ff02fad4..8a2b07e55c 100644 --- a/test/OpenMP/target_exit_data_depend_messages.cpp +++ b/test/OpenMP/target_exit_data_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_exit_data_device_messages.cpp b/test/OpenMP/target_exit_data_device_messages.cpp index ad27e8a50d..035bf6f76a 100644 --- a/test/OpenMP/target_exit_data_device_messages.cpp +++ b/test/OpenMP/target_exit_data_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -12,7 +12,7 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target exit data map(from: i) device // expected-error {{expected '(' after 'device'}} #pragma omp target exit data map(from: i) device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target exit data map(from: i) device () // expected-error {{expected expression}} @@ -23,7 +23,7 @@ int main(int argc, char **argv) { #pragma omp target exit data map(from: i) device (argc), device (argc+1) // expected-error {{directive '#pragma omp target exit data' cannot contain more than one 'device' clause}} #pragma omp target exit data map(from: i) device (S1) // expected-error {{'S1' does not refer to a value}} #pragma omp target exit data map(from: i) device (-2) // expected-error {{argument to 'device' clause must be a non-negative integer value}} - #pragma omp target exit data map(from: i) device (-10u) + #pragma omp target exit data map(from: i) device (-10u + z) #pragma omp target exit data map(from: i) device (3.14) // expected-error {{expression must have integral or unscoped enumeration type, not 'double'}} foo(); diff --git a/test/OpenMP/target_exit_data_if_messages.cpp b/test/OpenMP/target_exit_data_if_messages.cpp index 9341fe8179..c45b32ff3f 100644 --- a/test/OpenMP/target_exit_data_if_messages.cpp +++ b/test/OpenMP/target_exit_data_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -12,14 +12,14 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target exit data map(from: i) if // expected-error {{expected '(' after 'if'}} #pragma omp target exit data map(from: i) if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target exit data map(from: i) if () // expected-error {{expected expression}} #pragma omp target exit data map(from: i) if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target exit data map(from: i) if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target exit data' are ignored}} #pragma omp target exit data map(from: i) if (argc > 0 ? argv[1] : argv[2]) - #pragma omp target exit data map(from: i) if (argc + argc) + #pragma omp target exit data map(from: i) if (argc + argc + z) #pragma omp target exit data map(from: i) if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp target exit data' cannot contain more than one 'if' clause}} #pragma omp target exit data map(from: i) if (S1) // expected-error {{'S1' does not refer to a value}} #pragma omp target exit data map(from: i) if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} diff --git a/test/OpenMP/target_exit_data_map_messages.c b/test/OpenMP/target_exit_data_map_messages.c index 4a2df448d3..f90c0d4ad6 100644 --- a/test/OpenMP/target_exit_data_map_messages.c +++ b/test/OpenMP/target_exit_data_map_messages.c @@ -1,8 +1,8 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - -x c++ %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - -x c++ %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - -x c++ %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - -x c++ %s -Wuninitialized int main(int argc, char **argv) { diff --git a/test/OpenMP/target_exit_data_nowait_messages.cpp b/test/OpenMP/target_exit_data_nowait_messages.cpp index 02eded5a66..307e2c34b2 100644 --- a/test/OpenMP/target_exit_data_nowait_messages.cpp +++ b/test/OpenMP/target_exit_data_nowait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized int main(int argc, char **argv) { int i; diff --git a/test/OpenMP/target_firstprivate_messages.cpp b/test/OpenMP/target_firstprivate_messages.cpp index 248751f789..d96516aebe 100644 --- a/test/OpenMP/target_firstprivate_messages.cpp +++ b/test/OpenMP/target_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -99,7 +99,7 @@ template int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp target firstprivate // expected-error {{expected '(' after 'firstprivate'}} {} @@ -131,8 +131,8 @@ int foomain(I argc, C **argv) { int v = 0; int i; } -#pragma omp parallel shared(i) -#pragma omp parallel firstprivate(i) +#pragma omp parallel shared(i, z) +#pragma omp parallel firstprivate(i, z) #pragma omp target firstprivate(j) {} #pragma omp target firstprivate(i) @@ -159,7 +159,7 @@ int main(int argc, char **argv) { S5 g(5); S6 s6(0.0) , s6_0(1.0); S7 > s7(0.0) , s7_0(1.0); - int i; + int i, z; int &j = i; #pragma omp target firstprivate // expected-error {{expected '(' after 'firstprivate'}} {} @@ -173,7 +173,7 @@ int main(int argc, char **argv) { {} #pragma omp target firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} {} -#pragma omp target firstprivate(argc) +#pragma omp target firstprivate(argc, z) {} #pragma omp target firstprivate(S1) // expected-error {{'S1' does not refer to a value}} {} diff --git a/test/OpenMP/target_if_messages.cpp b/test/OpenMP/target_if_messages.cpp index 982fd4b0c0..e6b667f2cf 100644 --- a/test/OpenMP/target_if_messages.cpp +++ b/test/OpenMP/target_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp target if // expected-error {{expected '(' after 'if'}} foo(); #pragma omp target if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -33,7 +34,7 @@ int tmain(T argc, S **argv) { foo(); #pragma omp target if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}} foo(); - #pragma omp target if(argc) + #pragma omp target if(argc+z) foo(); #pragma omp target if(target : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} foo(); @@ -52,6 +53,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { +int z; #pragma omp target if // expected-error {{expected '(' after 'if'}} foo(); #pragma omp target if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -80,7 +82,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target if(target : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} foo(); - #pragma omp target if(target : argc) + #pragma omp target if(target : argc/z) foo(); #pragma omp target if(target : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target'}} foo(); diff --git a/test/OpenMP/target_is_device_ptr_messages.cpp b/test/OpenMP/target_is_device_ptr_messages.cpp index 6f218e20f9..92297438d5 100644 --- a/test/OpenMP/target_is_device_ptr_messages.cpp +++ b/test/OpenMP/target_is_device_ptr_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s -Wuninitialized -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s -Wuninitialized struct ST { int *a; }; @@ -40,7 +40,7 @@ struct SA { #pragma omp target is_device_ptr(aa) // OK {} #pragma omp target is_device_ptr(raa) // OK - {} + {} #pragma omp target is_device_ptr(e) // expected-error{{expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'}} {} #pragma omp target is_device_ptr(g) // OK diff --git a/test/OpenMP/target_map_messages.cpp b/test/OpenMP/target_map_messages.cpp index 04e201d136..15f7b4fe07 100644 --- a/test/OpenMP/target_map_messages.cpp +++ b/test/OpenMP/target_map_messages.cpp @@ -1,8 +1,8 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 200 %s -Wno-openmp-target -// RUN: %clang_cc1 -DCCODE -verify -fopenmp -ferror-limit 200 -x c %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 200 %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -DCCODE -verify -fopenmp -ferror-limit 200 -x c %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 200 %s -Wno-openmp-target -// RUN: %clang_cc1 -DCCODE -verify -fopenmp-simd -ferror-limit 200 -x c %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 200 %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -DCCODE -verify -fopenmp-simd -ferror-limit 200 -x c %s -Wno-openmp-target -Wuninitialized #ifdef CCODE void foo(int arg) { const int n = 0; diff --git a/test/OpenMP/target_nowait_messages.cpp b/test/OpenMP/target_nowait_messages.cpp index 1f982dd674..6b8a1f4d0a 100644 --- a/test/OpenMP/target_nowait_messages.cpp +++ b/test/OpenMP/target_nowait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_parallel_default_messages.cpp b/test/OpenMP/target_parallel_default_messages.cpp index 0aab663b0b..0691cdf37e 100644 --- a/test/OpenMP/target_parallel_default_messages.cpp +++ b/test/OpenMP/target_parallel_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/test/OpenMP/target_parallel_defaultmap_messages.cpp b/test/OpenMP/target_parallel_defaultmap_messages.cpp index 33078a2ea7..71a4d8a0ea 100644 --- a/test/OpenMP/target_parallel_defaultmap_messages.cpp +++ b/test/OpenMP/target_parallel_defaultmap_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_parallel_depend_messages.cpp b/test/OpenMP/target_parallel_depend_messages.cpp index 15e22134b3..61557bd2aa 100644 --- a/test/OpenMP/target_parallel_depend_messages.cpp +++ b/test/OpenMP/target_parallel_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_parallel_device_messages.cpp b/test/OpenMP/target_parallel_device_messages.cpp index cc25253753..9d5e4ed556 100644 --- a/test/OpenMP/target_parallel_device_messages.cpp +++ b/test/OpenMP/target_parallel_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -12,6 +12,7 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { + int k; #pragma omp target parallel device // expected-error {{expected '(' after 'device'}} foo(); #pragma omp target parallel device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -26,7 +27,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target parallel device (argc + argc) foo(); - #pragma omp target parallel device (argc), device (argc+1) // expected-error {{directive '#pragma omp target parallel' cannot contain more than one 'device' clause}} + #pragma omp target parallel device (k), device (argc+1) // expected-error {{directive '#pragma omp target parallel' cannot contain more than one 'device' clause}} foo(); #pragma omp target parallel device (S1) // expected-error {{'S1' does not refer to a value}} foo(); diff --git a/test/OpenMP/target_parallel_firstprivate_messages.cpp b/test/OpenMP/target_parallel_firstprivate_messages.cpp index d6c1bb2496..075beaeac8 100644 --- a/test/OpenMP/target_parallel_firstprivate_messages.cpp +++ b/test/OpenMP/target_parallel_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -72,7 +72,7 @@ int main(int argc, char **argv) { const int da[5] = { 0 }; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; static int m; #pragma omp target parallel firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -97,7 +97,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target parallel firstprivate(ba) allocate(omp_thread_mem_alloc: ba) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'target parallel' directive}} foo(); - #pragma omp target parallel firstprivate(ca) + #pragma omp target parallel firstprivate(ca, z) foo(); #pragma omp target parallel firstprivate(da) foo(); diff --git a/test/OpenMP/target_parallel_for_collapse_messages.cpp b/test/OpenMP/target_parallel_for_collapse_messages.cpp index 2e194ffbd0..98700b87e5 100644 --- a/test/OpenMP/target_parallel_for_collapse_messages.cpp +++ b/test/OpenMP/target_parallel_for_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_parallel_for_default_messages.cpp b/test/OpenMP/target_parallel_for_default_messages.cpp index 87f6a5bde1..fc6ba43138 100644 --- a/test/OpenMP/target_parallel_for_default_messages.cpp +++ b/test/OpenMP/target_parallel_for_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/test/OpenMP/target_parallel_for_defaultmap_messages.cpp b/test/OpenMP/target_parallel_for_defaultmap_messages.cpp index 9f97b60ff4..bdcc7684e4 100644 --- a/test/OpenMP/target_parallel_for_defaultmap_messages.cpp +++ b/test/OpenMP/target_parallel_for_defaultmap_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_parallel_for_depend_messages.cpp b/test/OpenMP/target_parallel_for_depend_messages.cpp index 4b255ab0f3..f6206912fe 100644 --- a/test/OpenMP/target_parallel_for_depend_messages.cpp +++ b/test/OpenMP/target_parallel_for_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_parallel_for_device_messages.cpp b/test/OpenMP/target_parallel_for_device_messages.cpp index bacf57d99c..2882c8fc56 100644 --- a/test/OpenMP/target_parallel_for_device_messages.cpp +++ b/test/OpenMP/target_parallel_for_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -12,7 +12,7 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target parallel for device // expected-error {{expected '(' after 'device'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -25,7 +25,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (i = 0; i < argc; ++i) foo(); - #pragma omp target parallel for device (argc + argc) + #pragma omp target parallel for device (z + argc) for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for device (argc), device (argc+1) // expected-error {{directive '#pragma omp target parallel for' cannot contain more than one 'device' clause}} for (i = 0; i < argc; ++i) foo(); diff --git a/test/OpenMP/target_parallel_for_firstprivate_messages.cpp b/test/OpenMP/target_parallel_for_firstprivate_messages.cpp index 286faec963..dd05d84cb4 100644 --- a/test/OpenMP/target_parallel_for_firstprivate_messages.cpp +++ b/test/OpenMP/target_parallel_for_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -76,7 +76,7 @@ template int foomain(int argc, char **argv) { I e(4); C g(5); - int i; + int i, z; int &j = i; #pragma omp target parallel for firstprivate // expected-error {{expected '(' after 'firstprivate'}} for (int k = 0; k < argc; ++k) @@ -102,7 +102,7 @@ int foomain(int argc, char **argv) { #pragma omp target parallel for firstprivate(S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target parallel for firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} +#pragma omp target parallel for firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target parallel for firstprivate(argv[1]) // expected-error {{expected variable name}} @@ -161,7 +161,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp target parallel for firstprivate // expected-error {{expected '(' after 'firstprivate'}} for (i = 0; i < argc; ++i) @@ -187,7 +187,7 @@ int main(int argc, char **argv) { #pragma omp target parallel for firstprivate(S1) // expected-error {{'S1' does not refer to a value}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target parallel for firstprivate(a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} +#pragma omp target parallel for firstprivate(z, a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for firstprivate(argv[1]) // expected-error {{expected variable name}} diff --git a/test/OpenMP/target_parallel_for_if_messages.cpp b/test/OpenMP/target_parallel_for_if_messages.cpp index 2bc433cf42..445dc1775b 100644 --- a/test/OpenMP/target_parallel_for_if_messages.cpp +++ b/test/OpenMP/target_parallel_for_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { int i; + T z; #pragma omp target parallel for if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -34,7 +35,7 @@ int tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp target parallel for if(argc) + #pragma omp target parallel for if(argc + z) for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for if(target : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); @@ -61,7 +62,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target parallel for if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -72,7 +73,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}} for (i = 0; i < argc; ++i) foo(); - #pragma omp target parallel for if (argc > 0 ? argv[1] : argv[2]) + #pragma omp target parallel for if (argc > 0 ? argv[1] : argv[2] - z) for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp target parallel for' cannot contain more than one 'if' clause}} for (i = 0; i < argc; ++i) foo(); diff --git a/test/OpenMP/target_parallel_for_is_device_ptr_messages.cpp b/test/OpenMP/target_parallel_for_is_device_ptr_messages.cpp index 3e675ead2a..db3aa32edf 100644 --- a/test/OpenMP/target_parallel_for_is_device_ptr_messages.cpp +++ b/test/OpenMP/target_parallel_for_is_device_ptr_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct ST { int *a; diff --git a/test/OpenMP/target_parallel_for_lastprivate_messages.cpp b/test/OpenMP/target_parallel_for_lastprivate_messages.cpp index d01e393bae..906b5923e3 100644 --- a/test/OpenMP/target_parallel_for_lastprivate_messages.cpp +++ b/test/OpenMP/target_parallel_for_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; diff --git a/test/OpenMP/target_parallel_for_linear_messages.cpp b/test/OpenMP/target_parallel_for_linear_messages.cpp index 3556faa3ca..f5af0ed3c8 100644 --- a/test/OpenMP/target_parallel_for_linear_messages.cpp +++ b/test/OpenMP/target_parallel_for_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -129,7 +129,7 @@ template int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp target parallel for linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) @@ -166,7 +166,7 @@ int foomain(I argc, C **argv) { #pragma omp target parallel for allocate(omp_thread_mem_alloc: e) linear(e, g) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'target parallel for' directive}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target parallel for linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}} +#pragma omp target parallel for linear(z, h) // expected-error {{threadprivate or thread local variable cannot be linear}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target parallel for linear(i) @@ -214,7 +214,7 @@ int main(int argc, char **argv) { S4 e(4); // expected-note {{'e' defined here}} S5 g(5); // expected-note {{'g' defined here}} - int i; + int i, z; int &j = i; #pragma omp target parallel for linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) @@ -234,7 +234,7 @@ int main(int argc, char **argv) { #pragma omp target parallel for linear(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target parallel for linear(argc) +#pragma omp target parallel for linear(argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp target parallel for linear(S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/target_parallel_for_loop_messages.cpp b/test/OpenMP/target_parallel_for_loop_messages.cpp index 6cc1f80887..e81d3b2dee 100644 --- a/test/OpenMP/target_parallel_for_loop_messages.cpp +++ b/test/OpenMP/target_parallel_for_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized class S { int a; diff --git a/test/OpenMP/target_parallel_for_map_messages.cpp b/test/OpenMP/target_parallel_for_map_messages.cpp index 6ef87d442f..0f02350e29 100644 --- a/test/OpenMP/target_parallel_for_map_messages.cpp +++ b/test/OpenMP/target_parallel_for_map_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_parallel_for_messages.cpp b/test/OpenMP/target_parallel_for_messages.cpp index c454987e25..e78154a5b3 100644 --- a/test/OpenMP/target_parallel_for_messages.cpp +++ b/test/OpenMP/target_parallel_for_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_parallel_for_misc_messages.c b/test/OpenMP/target_parallel_for_misc_messages.c index 44629e10c0..f697cf2e6c 100644 --- a/test/OpenMP/target_parallel_for_misc_messages.c +++ b/test/OpenMP/target_parallel_for_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target parallel for'}} #pragma omp target parallel for diff --git a/test/OpenMP/target_parallel_for_nowait_messages.cpp b/test/OpenMP/target_parallel_for_nowait_messages.cpp index 2fb875b9de..2f88c6581d 100644 --- a/test/OpenMP/target_parallel_for_nowait_messages.cpp +++ b/test/OpenMP/target_parallel_for_nowait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_parallel_for_num_threads_messages.cpp b/test/OpenMP/target_parallel_for_num_threads_messages.cpp index b47c96b82b..11f0c90780 100644 --- a/test/OpenMP/target_parallel_for_num_threads_messages.cpp +++ b/test/OpenMP/target_parallel_for_num_threads_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} T tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp target parallel for num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -22,7 +22,7 @@ T tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp target parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}} + #pragma omp target parallel for num_threads (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for num_threads ((argc > 0) ? argv[1] : argv[2]) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}} for (i = 0; i < argc; ++i) foo(); @@ -41,7 +41,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target parallel for num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -50,7 +50,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp target parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}} + #pragma omp target parallel for num_threads (z + argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }} for (i = 0; i < argc; ++i) foo(); diff --git a/test/OpenMP/target_parallel_for_ordered_messages.cpp b/test/OpenMP/target_parallel_for_ordered_messages.cpp index 38a977e293..b703f251f4 100644 --- a/test/OpenMP/target_parallel_for_ordered_messages.cpp +++ b/test/OpenMP/target_parallel_for_ordered_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_parallel_for_private_messages.cpp b/test/OpenMP/target_parallel_for_private_messages.cpp index 2e3848a600..4635896a53 100644 --- a/test/OpenMP/target_parallel_for_private_messages.cpp +++ b/test/OpenMP/target_parallel_for_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -106,7 +106,7 @@ template int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp target parallel for private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) @@ -132,7 +132,7 @@ int foomain(I argc, C **argv) { #pragma omp target parallel for private(S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target parallel for private(a, b) // expected-error {{private variable with incomplete type 'S1'}} +#pragma omp target parallel for private(a, b, z) // expected-error {{private variable with incomplete type 'S1'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target parallel for private(argv[1]) // expected-error {{expected variable name}} @@ -178,7 +178,7 @@ int main(int argc, char **argv) { S5 g(5); S6 s6(0.0) , s6_0(1.0); S7 > s7(0.0) , s7_0(1.0); - int i; + int i ,z; int &j = i; #pragma omp target parallel for private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) @@ -198,7 +198,7 @@ int main(int argc, char **argv) { #pragma omp target parallel for private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target parallel for private(argc) +#pragma omp target parallel for private(argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp target parallel for private(S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/target_parallel_for_proc_bind_messages.cpp b/test/OpenMP/target_parallel_for_proc_bind_messages.cpp index 60d5b74fdc..1adb0b50c2 100644 --- a/test/OpenMP/target_parallel_for_proc_bind_messages.cpp +++ b/test/OpenMP/target_parallel_for_proc_bind_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/test/OpenMP/target_parallel_for_reduction_messages.cpp b/test/OpenMP/target_parallel_for_reduction_messages.cpp index 3b201f2f2e..3666a34c95 100644 --- a/test/OpenMP/target_parallel_for_reduction_messages.cpp +++ b/test/OpenMP/target_parallel_for_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -95,7 +95,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -140,7 +140,7 @@ T tmain(T argc) { #pragma omp target parallel for reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target parallel for reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} @@ -217,7 +217,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -256,7 +256,7 @@ int main(int argc, char **argv) { #pragma omp target parallel for reduction(~ : argc) // expected-error {{expected unqualified-id}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for reduction(&& : argc) +#pragma omp target parallel for reduction(&& : argc, z) for (int i = 0; i < 10; ++i) foo(); #pragma omp target parallel for reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/target_parallel_for_schedule_messages.cpp b/test/OpenMP/target_parallel_for_schedule_messages.cpp index 544ace25e4..287585dfec 100644 --- a/test/OpenMP/target_parallel_for_schedule_messages.cpp +++ b/test/OpenMP/target_parallel_for_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} T tmain(T argc, S **argv) { + T z; #pragma omp target parallel for schedule // expected-error {{expected '(' after 'schedule'}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp target parallel for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -46,7 +47,7 @@ T tmain(T argc, S **argv) { // expected-error@+1 2 {{expression must have integral or unscoped enumeration type, not 'char *'}} #pragma omp target parallel for schedule (guided, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; - #pragma omp target parallel for schedule (dynamic, 1) + #pragma omp target parallel for schedule (dynamic, 1 + z) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp target parallel for schedule (static, N) // expected-error {{argument to 'schedule' clause must be a strictly positive integer value}} for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; @@ -54,6 +55,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp target parallel for schedule // expected-error {{expected '(' after 'schedule'}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp target parallel for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -72,7 +74,7 @@ int main(int argc, char **argv) { for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp target parallel for schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; - #pragma omp target parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2) + #pragma omp target parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2 + z) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error@+2 2 {{directive '#pragma omp target parallel for' cannot contain more than one 'schedule' clause}} // expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}} diff --git a/test/OpenMP/target_parallel_for_simd_aligned_messages.cpp b/test/OpenMP/target_parallel_for_simd_aligned_messages.cpp index 54a6a9e8de..b73abba48e 100644 --- a/test/OpenMP/target_parallel_for_simd_aligned_messages.cpp +++ b/test/OpenMP/target_parallel_for_simd_aligned_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct B { static int ib[20]; // expected-note 0 {{'B::ib' declared here}} diff --git a/test/OpenMP/target_parallel_for_simd_collapse_messages.cpp b/test/OpenMP/target_parallel_for_simd_collapse_messages.cpp index 24e30b3d3f..df1b27d283 100644 --- a/test/OpenMP/target_parallel_for_simd_collapse_messages.cpp +++ b/test/OpenMP/target_parallel_for_simd_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_parallel_for_simd_default_messages.cpp b/test/OpenMP/target_parallel_for_simd_default_messages.cpp index 91e745d911..daa93b9c90 100644 --- a/test/OpenMP/target_parallel_for_simd_default_messages.cpp +++ b/test/OpenMP/target_parallel_for_simd_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/test/OpenMP/target_parallel_for_simd_defaultmap_messages.cpp b/test/OpenMP/target_parallel_for_simd_defaultmap_messages.cpp index c019c37c39..1affed137a 100644 --- a/test/OpenMP/target_parallel_for_simd_defaultmap_messages.cpp +++ b/test/OpenMP/target_parallel_for_simd_defaultmap_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_parallel_for_simd_depend_messages.cpp b/test/OpenMP/target_parallel_for_simd_depend_messages.cpp index 6410a6c35a..01e00bf15f 100644 --- a/test/OpenMP/target_parallel_for_simd_depend_messages.cpp +++ b/test/OpenMP/target_parallel_for_simd_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_parallel_for_simd_device_messages.cpp b/test/OpenMP/target_parallel_for_simd_device_messages.cpp index 8d2719571a..a592cac8d5 100644 --- a/test/OpenMP/target_parallel_for_simd_device_messages.cpp +++ b/test/OpenMP/target_parallel_for_simd_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -12,7 +12,7 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target parallel for simd device // expected-error {{expected '(' after 'device'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -25,7 +25,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (i = 0; i < argc; ++i) foo(); - #pragma omp target parallel for simd device (argc + argc) + #pragma omp target parallel for simd device (argc + argc + z) for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd device (argc), device (argc+1) // expected-error {{directive '#pragma omp target parallel for simd' cannot contain more than one 'device' clause}} for (i = 0; i < argc; ++i) foo(); diff --git a/test/OpenMP/target_parallel_for_simd_firstprivate_messages.cpp b/test/OpenMP/target_parallel_for_simd_firstprivate_messages.cpp index 77661a3133..d76fedcce8 100644 --- a/test/OpenMP/target_parallel_for_simd_firstprivate_messages.cpp +++ b/test/OpenMP/target_parallel_for_simd_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -76,7 +76,7 @@ template int foomain(int argc, char **argv) { I e(4); C g(5); - int i; + int i,z; int &j = i; #pragma omp target parallel for simd firstprivate // expected-error {{expected '(' after 'firstprivate'}} for (int k = 0; k < argc; ++k) @@ -102,7 +102,7 @@ int foomain(int argc, char **argv) { #pragma omp target parallel for simd firstprivate(S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target parallel for simd firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} +#pragma omp target parallel for simd firstprivate(z, a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target parallel for simd firstprivate(argv[1]) // expected-error {{expected variable name}} @@ -161,7 +161,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp target parallel for simd firstprivate // expected-error {{expected '(' after 'firstprivate'}} for (i = 0; i < argc; ++i) @@ -187,7 +187,7 @@ int main(int argc, char **argv) { #pragma omp target parallel for simd firstprivate(S1) // expected-error {{'S1' does not refer to a value}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target parallel for simd firstprivate(a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} +#pragma omp target parallel for simd firstprivate(z, a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd firstprivate(argv[1]) // expected-error {{expected variable name}} diff --git a/test/OpenMP/target_parallel_for_simd_if_messages.cpp b/test/OpenMP/target_parallel_for_simd_if_messages.cpp index fea1ad9778..b0da801701 100644 --- a/test/OpenMP/target_parallel_for_simd_if_messages.cpp +++ b/test/OpenMP/target_parallel_for_simd_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { - int i; + int i, k; #pragma omp target parallel for simd if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -34,7 +34,7 @@ int tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp target parallel for simd if(argc) + #pragma omp target parallel for simd if(k) for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd if(target : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); @@ -61,7 +61,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, k; #pragma omp target parallel for simd if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -90,7 +90,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp target parallel for simd if(parallel : argc) + #pragma omp target parallel for simd if(parallel : k) for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd if(target : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target parallel for simd'}} for (i = 0; i < argc; ++i) foo(); diff --git a/test/OpenMP/target_parallel_for_simd_is_device_ptr_messages.cpp b/test/OpenMP/target_parallel_for_simd_is_device_ptr_messages.cpp index 1079bf3cbb..47e498a44c 100644 --- a/test/OpenMP/target_parallel_for_simd_is_device_ptr_messages.cpp +++ b/test/OpenMP/target_parallel_for_simd_is_device_ptr_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct ST { int *a; }; diff --git a/test/OpenMP/target_parallel_for_simd_lastprivate_messages.cpp b/test/OpenMP/target_parallel_for_simd_lastprivate_messages.cpp index 750fa3b19a..04f52f540d 100644 --- a/test/OpenMP/target_parallel_for_simd_lastprivate_messages.cpp +++ b/test/OpenMP/target_parallel_for_simd_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -78,7 +78,7 @@ template int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp target parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} for (int k = 0; k < argc; ++k) @@ -104,7 +104,7 @@ int foomain(int argc, char **argv) { #pragma omp target parallel for simd lastprivate(S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target parallel for simd lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} +#pragma omp target parallel for simd lastprivate(z, a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target parallel for simd lastprivate(argv[1]) // expected-error {{expected variable name}} @@ -152,7 +152,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp target parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} for (i = 0; i < argc; ++i) @@ -187,7 +187,7 @@ int main(int argc, char **argv) { #pragma omp target parallel for simd lastprivate(2 * 2) // expected-error {{expected variable name}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target parallel for simd lastprivate(ba) +#pragma omp target parallel for simd lastprivate(ba, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} diff --git a/test/OpenMP/target_parallel_for_simd_linear_messages.cpp b/test/OpenMP/target_parallel_for_simd_linear_messages.cpp index b5664dd317..829e9eb566 100644 --- a/test/OpenMP/target_parallel_for_simd_linear_messages.cpp +++ b/test/OpenMP/target_parallel_for_simd_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -129,7 +129,7 @@ template int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp target parallel for simd linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) @@ -163,7 +163,7 @@ int foomain(I argc, C **argv) { #pragma omp target parallel for simd linear(argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target parallel for simd linear(e, g) +#pragma omp target parallel for simd linear(e, g, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp target parallel for simd linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}} @@ -214,7 +214,7 @@ int main(int argc, char **argv) { S4 e(4); // expected-note {{'e' defined here}} S5 g(5); // expected-note {{'g' defined here}} - int i; + int i, z; int &j = i; #pragma omp target parallel for simd linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) @@ -234,7 +234,7 @@ int main(int argc, char **argv) { #pragma omp target parallel for simd linear(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target parallel for simd linear(argc) +#pragma omp target parallel for simd linear(argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp target parallel for simd linear(S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/target_parallel_for_simd_loop_messages.cpp b/test/OpenMP/target_parallel_for_simd_loop_messages.cpp index e2e80186cd..9bcef91a25 100644 --- a/test/OpenMP/target_parallel_for_simd_loop_messages.cpp +++ b/test/OpenMP/target_parallel_for_simd_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized class S { int a; diff --git a/test/OpenMP/target_parallel_for_simd_map_messages.cpp b/test/OpenMP/target_parallel_for_simd_map_messages.cpp index f18cc9a5f8..6f7dc528d8 100644 --- a/test/OpenMP/target_parallel_for_simd_map_messages.cpp +++ b/test/OpenMP/target_parallel_for_simd_map_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized void foo() { } @@ -61,7 +61,7 @@ T tmain(T argc) { T &j = i; T *k = &j; T x; - T y; + T y ,z; T to, tofrom, always; const T (&l)[5] = da; @@ -102,7 +102,7 @@ T tmain(T argc) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd map(S2::S2sc) for (i = 0; i < argc; ++i) foo(); -#pragma omp target parallel for simd map(x) +#pragma omp target parallel for simd map(x, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd map(to: x) for (i = 0; i < argc; ++i) foo(); @@ -184,7 +184,7 @@ int main(int argc, char **argv) { int &j = i; int *k = &j; int x; - int y; + int y, z; int to, tofrom, always; const int (&l)[5] = da; @@ -216,7 +216,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd map(to: to) for (i = 0; i < argc; ++i) foo(); -#pragma omp target parallel for simd map(to) +#pragma omp target parallel for simd map(to, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd map(to, x) for (i = 0; i < argc; ++i) foo(); diff --git a/test/OpenMP/target_parallel_for_simd_messages.cpp b/test/OpenMP/target_parallel_for_simd_messages.cpp index 76090e8553..5d07c895b9 100644 --- a/test/OpenMP/target_parallel_for_simd_messages.cpp +++ b/test/OpenMP/target_parallel_for_simd_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_parallel_for_simd_misc_messages.c b/test/OpenMP/target_parallel_for_simd_misc_messages.c index 8886ddd4a1..1459d8322a 100644 --- a/test/OpenMP/target_parallel_for_simd_misc_messages.c +++ b/test/OpenMP/target_parallel_for_simd_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target parallel for simd'}} #pragma omp target parallel for simd diff --git a/test/OpenMP/target_parallel_for_simd_nowait_messages.cpp b/test/OpenMP/target_parallel_for_simd_nowait_messages.cpp index 5e1e13168d..4220bfea3e 100644 --- a/test/OpenMP/target_parallel_for_simd_nowait_messages.cpp +++ b/test/OpenMP/target_parallel_for_simd_nowait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_parallel_for_simd_num_threads_messages.cpp b/test/OpenMP/target_parallel_for_simd_num_threads_messages.cpp index b3323f6772..f7979057ae 100644 --- a/test/OpenMP/target_parallel_for_simd_num_threads_messages.cpp +++ b/test/OpenMP/target_parallel_for_simd_num_threads_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} T tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp target parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -22,7 +22,7 @@ T tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp target parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}} + #pragma omp target parallel for simd num_threads (argc+z)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd num_threads ((argc > 0) ? argv[1] : argv[2]) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}} for (i = 0; i < argc; ++i) foo(); @@ -41,7 +41,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -50,7 +50,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp target parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}} + #pragma omp target parallel for simd num_threads (z-argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target parallel for simd num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }} for (i = 0; i < argc; ++i) foo(); diff --git a/test/OpenMP/target_parallel_for_simd_ordered_messages.cpp b/test/OpenMP/target_parallel_for_simd_ordered_messages.cpp index 08b9247c1b..235cbe464f 100644 --- a/test/OpenMP/target_parallel_for_simd_ordered_messages.cpp +++ b/test/OpenMP/target_parallel_for_simd_ordered_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_parallel_for_simd_private_messages.cpp b/test/OpenMP/target_parallel_for_simd_private_messages.cpp index 6210323330..4e0859db32 100644 --- a/test/OpenMP/target_parallel_for_simd_private_messages.cpp +++ b/test/OpenMP/target_parallel_for_simd_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -106,7 +106,7 @@ template int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp target parallel for simd private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) @@ -138,7 +138,7 @@ int foomain(I argc, C **argv) { #pragma omp target parallel for simd private(argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target parallel for simd private(e, g) +#pragma omp target parallel for simd private(e, g, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp target parallel for simd private(h) // expected-error {{threadprivate or thread local variable cannot be private}} @@ -178,7 +178,7 @@ int main(int argc, char **argv) { S5 g(5); S6 s6(0.0) , s6_0(1.0); // expected-note {{in instantiation of member function 'S6::S6' requested here}} S7 > s7(0.0) , s7_0(1.0); - int i; + int i, z; int &j = i; #pragma omp target parallel for simd private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) @@ -198,7 +198,7 @@ int main(int argc, char **argv) { #pragma omp target parallel for simd private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target parallel for simd private(argc) +#pragma omp target parallel for simd private(argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp target parallel for simd private(S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/target_parallel_for_simd_proc_bind_messages.cpp b/test/OpenMP/target_parallel_for_simd_proc_bind_messages.cpp index 83b4efad15..ba16e06ea1 100644 --- a/test/OpenMP/target_parallel_for_simd_proc_bind_messages.cpp +++ b/test/OpenMP/target_parallel_for_simd_proc_bind_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/test/OpenMP/target_parallel_for_simd_reduction_messages.cpp b/test/OpenMP/target_parallel_for_simd_reduction_messages.cpp index 87be4f1c65..126518a58d 100644 --- a/test/OpenMP/target_parallel_for_simd_reduction_messages.cpp +++ b/test/OpenMP/target_parallel_for_simd_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -95,7 +95,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -140,7 +140,7 @@ T tmain(T argc) { #pragma omp target parallel for simd reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target parallel for simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} @@ -217,7 +217,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -256,7 +256,7 @@ int main(int argc, char **argv) { #pragma omp target parallel for simd reduction(~ : argc) // expected-error {{expected unqualified-id}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target parallel for simd reduction(&& : argc) +#pragma omp target parallel for simd reduction(&& : argc, z) for (int i = 0; i < 10; ++i) foo(); #pragma omp target parallel for simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/target_parallel_for_simd_safelen_messages.cpp b/test/OpenMP/target_parallel_for_simd_safelen_messages.cpp index 1121593e5e..87aaa83a78 100644 --- a/test/OpenMP/target_parallel_for_simd_safelen_messages.cpp +++ b/test/OpenMP/target_parallel_for_simd_safelen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_parallel_for_simd_schedule_messages.cpp b/test/OpenMP/target_parallel_for_simd_schedule_messages.cpp index 6f26e7aac4..5d118b7c9a 100644 --- a/test/OpenMP/target_parallel_for_simd_schedule_messages.cpp +++ b/test/OpenMP/target_parallel_for_simd_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} T tmain(T argc, S **argv) { + T z; #pragma omp target parallel for simd schedule // expected-error {{expected '(' after 'schedule'}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp target parallel for simd schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -35,7 +36,7 @@ T tmain(T argc, S **argv) { for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp target parallel for simd schedule (dynamic, 1)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; - #pragma omp target parallel for simd schedule (guided, (ST > 0) ? 1 + ST : 2) + #pragma omp target parallel for simd schedule (guided, (ST > 0) ? 1 + ST : 2 + z) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+2 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'schedule' clause}} // expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}} @@ -54,6 +55,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp target parallel for simd schedule // expected-error {{expected '(' after 'schedule'}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp target parallel for simd schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto', 'runtime', 'monotonic', 'nonmonotonic' or 'simd' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -72,7 +74,7 @@ int main(int argc, char **argv) { for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp target parallel for simd schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; - #pragma omp target parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2) + #pragma omp target parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2 - z) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error@+2 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'schedule' clause}} // expected-error@+1 {{argument to 'schedule' clause must be a strictly positive integer value}} diff --git a/test/OpenMP/target_parallel_for_simd_simdlen_messages.cpp b/test/OpenMP/target_parallel_for_simd_simdlen_messages.cpp index 33a6642a8d..17a931c9f1 100644 --- a/test/OpenMP/target_parallel_for_simd_simdlen_messages.cpp +++ b/test/OpenMP/target_parallel_for_simd_simdlen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_parallel_if_messages.cpp b/test/OpenMP/target_parallel_if_messages.cpp index d59b4ab507..460e0c8655 100644 --- a/test/OpenMP/target_parallel_if_messages.cpp +++ b/test/OpenMP/target_parallel_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp target parallel if // expected-error {{expected '(' after 'if'}} foo(); #pragma omp target parallel if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -23,7 +24,7 @@ int tmain(T argc, S **argv) { foo(); #pragma omp target parallel if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel' are ignored}} foo(); - #pragma omp target parallel if (argc > 0 ? argv[1] : argv[2]) + #pragma omp target parallel if (argc > 0 ? argv[1] : argv[2] + z) foo(); #pragma omp target parallel if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp target parallel' cannot contain more than one 'if' clause}} foo(); @@ -60,6 +61,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp target parallel if // expected-error {{expected '(' after 'if'}} foo(); #pragma omp target parallel if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -88,7 +90,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target parallel if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} foo(); - #pragma omp target parallel if(parallel : argc) + #pragma omp target parallel if(parallel : argc * z) foo(); #pragma omp target parallel if(target : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target parallel'}} foo(); diff --git a/test/OpenMP/target_parallel_is_device_ptr_messages.cpp b/test/OpenMP/target_parallel_is_device_ptr_messages.cpp index b46fd713ff..9913133734 100644 --- a/test/OpenMP/target_parallel_is_device_ptr_messages.cpp +++ b/test/OpenMP/target_parallel_is_device_ptr_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s -Wuninitialized -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s -Wuninitialized struct ST { int *a; }; diff --git a/test/OpenMP/target_parallel_map_messages.cpp b/test/OpenMP/target_parallel_map_messages.cpp index 52774aa741..a7a4e1cd9c 100644 --- a/test/OpenMP/target_parallel_map_messages.cpp +++ b/test/OpenMP/target_parallel_map_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized void foo() { } @@ -61,7 +61,7 @@ T tmain(T argc) { T &j = i; T *k = &j; T x; - T y; + T y, z; T to, tofrom, always; const T (&l)[5] = da; @@ -88,7 +88,7 @@ T tmain(T argc) { foo(); #pragma omp target parallel map(l[true:true]) foo(); -#pragma omp target parallel map(x) +#pragma omp target parallel map(x, z) foo(); #pragma omp target parallel map(tofrom: t[:I]) foo(); diff --git a/test/OpenMP/target_parallel_messages.cpp b/test/OpenMP/target_parallel_messages.cpp index a7dfbf91ca..f664ec1210 100644 --- a/test/OpenMP/target_parallel_messages.cpp +++ b/test/OpenMP/target_parallel_messages.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized // RUN: not %clang_cc1 -fopenmp -std=c++11 -fopenmp-targets=aaa-bbb-ccc-ddd -o - %s 2>&1 | FileCheck %s // RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s diff --git a/test/OpenMP/target_parallel_nowait_messages.cpp b/test/OpenMP/target_parallel_nowait_messages.cpp index 8da03e4756..3e285fca3a 100644 --- a/test/OpenMP/target_parallel_nowait_messages.cpp +++ b/test/OpenMP/target_parallel_nowait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_parallel_num_threads_messages.cpp b/test/OpenMP/target_parallel_num_threads_messages.cpp index efc1d1327f..79f77b7dc9 100644 --- a/test/OpenMP/target_parallel_num_threads_messages.cpp +++ b/test/OpenMP/target_parallel_num_threads_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -15,6 +15,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} T tmain(T argc, S **argv) { + T z; #pragma omp target parallel num_threads // expected-error {{expected '(' after 'num_threads'}} foo(); #pragma omp target parallel num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -33,7 +34,7 @@ T tmain(T argc, S **argv) { foo(); #pragma omp target parallel num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}} foo(); - #pragma omp target parallel num_threads (argc) + #pragma omp target parallel num_threads (argc + z) foo(); #pragma omp target parallel num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}} foo(); @@ -44,6 +45,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp target parallel num_threads // expected-error {{expected '(' after 'num_threads'}} foo(); #pragma omp target parallel num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -52,7 +54,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target parallel num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} foo(); - #pragma omp target parallel num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel' are ignored}} + #pragma omp target parallel num_threads (z + argc)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel' are ignored}} foo(); #pragma omp target parallel num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }} foo(); diff --git a/test/OpenMP/target_parallel_private_messages.cpp b/test/OpenMP/target_parallel_private_messages.cpp index 97ed1fc96a..a23c2ea2f1 100644 --- a/test/OpenMP/target_parallel_private_messages.cpp +++ b/test/OpenMP/target_parallel_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; diff --git a/test/OpenMP/target_parallel_proc_bind_messages.cpp b/test/OpenMP/target_parallel_proc_bind_messages.cpp index a01b63d7fe..0b8d1821b3 100644 --- a/test/OpenMP/target_parallel_proc_bind_messages.cpp +++ b/test/OpenMP/target_parallel_proc_bind_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/test/OpenMP/target_parallel_reduction_messages.cpp b/test/OpenMP/target_parallel_reduction_messages.cpp index eca57a8cce..929d6af18c 100644 --- a/test/OpenMP/target_parallel_reduction_messages.cpp +++ b/test/OpenMP/target_parallel_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -94,7 +94,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -126,7 +126,7 @@ T tmain(T argc) { foo(); #pragma omp target parallel reduction(^ : T) // expected-error {{'T' does not refer to a value}} foo(); -#pragma omp target parallel reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target parallel reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} foo(); #pragma omp target parallel reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} foo(); @@ -192,7 +192,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -220,7 +220,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target parallel reduction(~ : argc) // expected-error {{expected unqualified-id}} foo(); -#pragma omp target parallel reduction(&& : argc) +#pragma omp target parallel reduction(&& : argc, z) foo(); #pragma omp target parallel reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} foo(); diff --git a/test/OpenMP/target_parallel_shared_messages.cpp b/test/OpenMP/target_parallel_shared_messages.cpp index 2ade722dd3..f32c9edc28 100644 --- a/test/OpenMP/target_parallel_shared_messages.cpp +++ b/test/OpenMP/target_parallel_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -59,7 +59,7 @@ int main(int argc, char **argv) { const int da[5] = { 0 }; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; #pragma omp target parallel shared // expected-error {{expected '(' after 'shared'}} foo(); @@ -77,7 +77,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target parallel shared (S1) // expected-error {{'S1' does not refer to a value}} foo(); - #pragma omp target parallel shared (a, b, c, d, f) + #pragma omp target parallel shared (a, b, c, d, f, z) foo(); #pragma omp target parallel shared (argv[1]) // expected-error {{expected variable name}} foo(); diff --git a/test/OpenMP/target_private_messages.cpp b/test/OpenMP/target_private_messages.cpp index 245a0ea2b0..d0db6be239 100644 --- a/test/OpenMP/target_private_messages.cpp +++ b/test/OpenMP/target_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; diff --git a/test/OpenMP/target_reduction_messages.cpp b/test/OpenMP/target_reduction_messages.cpp index b9b744f455..28c7c95723 100644 --- a/test/OpenMP/target_reduction_messages.cpp +++ b/test/OpenMP/target_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -94,7 +94,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -122,7 +122,7 @@ T tmain(T argc) { foo(); #pragma omp target reduction(foo : argc) //expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max' or declare reduction for type 'float'}} expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max' or declare reduction for type 'int'}} foo(); -#pragma omp target reduction(&& : argc) +#pragma omp target reduction(&& : argc, z) foo(); #pragma omp target reduction(^ : T) // expected-error {{'T' does not refer to a value}} foo(); @@ -189,7 +189,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -223,7 +223,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} foo(); -#pragma omp target reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} +#pragma omp target reduction(min : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} foo(); #pragma omp target reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} foo(); diff --git a/test/OpenMP/target_simd_aligned_messages.cpp b/test/OpenMP/target_simd_aligned_messages.cpp index d2628b4357..3069e70273 100644 --- a/test/OpenMP/target_simd_aligned_messages.cpp +++ b/test/OpenMP/target_simd_aligned_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct B { static int ib[20]; // expected-note 0 {{'B::ib' declared here}} diff --git a/test/OpenMP/target_simd_collapse_messages.cpp b/test/OpenMP/target_simd_collapse_messages.cpp index 8bf2c3bbf7..89b940221d 100644 --- a/test/OpenMP/target_simd_collapse_messages.cpp +++ b/test/OpenMP/target_simd_collapse_messages.cpp @@ -1,8 +1,8 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_simd_defaultmap_messages.cpp b/test/OpenMP/target_simd_defaultmap_messages.cpp index 33e12c1e0e..2284643454 100644 --- a/test/OpenMP/target_simd_defaultmap_messages.cpp +++ b/test/OpenMP/target_simd_defaultmap_messages.cpp @@ -1,13 +1,13 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } template T tmain(T argc, S **argv) { - int i; + int i, k; #pragma omp target simd defaultmap // expected-error {{expected '(' after 'defaultmap'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target simd defaultmap ( // expected-error {{expected 'tofrom' in OpenMP clause 'defaultmap'}} expected-error {{expected ')'}} expected-note {{to match this '('}} diff --git a/test/OpenMP/target_simd_depend_messages.cpp b/test/OpenMP/target_simd_depend_messages.cpp index 69594db71c..c02fac5a82 100644 --- a/test/OpenMP/target_simd_depend_messages.cpp +++ b/test/OpenMP/target_simd_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_simd_device_messages.cpp b/test/OpenMP/target_simd_device_messages.cpp index d705f61402..15bfec132a 100644 --- a/test/OpenMP/target_simd_device_messages.cpp +++ b/test/OpenMP/target_simd_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -12,7 +12,7 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target simd device // expected-error {{expected '(' after 'device'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target simd device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -25,7 +25,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target simd device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (i = 0; i < argc; ++i) foo(); - #pragma omp target simd device (argc + argc) + #pragma omp target simd device (argc + argc * z) for (i = 0; i < argc; ++i) foo(); #pragma omp target simd device (argc), device (argc+1) // expected-error {{directive '#pragma omp target simd' cannot contain more than one 'device' clause}} for (i = 0; i < argc; ++i) foo(); diff --git a/test/OpenMP/target_simd_firstprivate_messages.cpp b/test/OpenMP/target_simd_firstprivate_messages.cpp index eac95ade6f..c26ef158f8 100644 --- a/test/OpenMP/target_simd_firstprivate_messages.cpp +++ b/test/OpenMP/target_simd_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -76,7 +76,7 @@ template int foomain(int argc, char **argv) { I e(4); C g(5); - int i; + int i, z; int &j = i; #pragma omp target simd firstprivate // expected-error {{expected '(' after 'firstprivate'}} for (int k = 0; k < argc; ++k) @@ -102,7 +102,7 @@ int foomain(int argc, char **argv) { #pragma omp target simd firstprivate(S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target simd firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}} +#pragma omp target simd firstprivate(a, b, z) // expected-error {{firstprivate variable with incomplete type 'S1'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target simd firstprivate(argv[1]) // expected-error {{expected variable name}} @@ -161,7 +161,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp target simd firstprivate // expected-error {{expected '(' after 'firstprivate'}} for (i = 0; i < argc; ++i) @@ -181,7 +181,7 @@ int main(int argc, char **argv) { #pragma omp target simd firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target simd firstprivate(argc) +#pragma omp target simd firstprivate(argc, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target simd firstprivate(S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/target_simd_if_messages.cpp b/test/OpenMP/target_simd_if_messages.cpp index 60dee37ac5..94d2ab308d 100644 --- a/test/OpenMP/target_simd_if_messages.cpp +++ b/test/OpenMP/target_simd_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; int i; #pragma omp target simd if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); @@ -34,7 +35,7 @@ int tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target simd if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp target simd if(argc) + #pragma omp target simd if(argc + z) for (i = 0; i < argc; ++i) foo(); #pragma omp target simd if(target : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); @@ -53,7 +54,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target simd if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -82,7 +83,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target simd if(target : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); - #pragma omp target simd if(target : argc) if (simd:argc) // expected-error {{directive name modifier 'simd' is not allowed for '#pragma omp target simd'}} + #pragma omp target simd if(target : argc + z) if (simd:argc) // expected-error {{directive name modifier 'simd' is not allowed for '#pragma omp target simd'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target simd if(target : argc) if (target :argc) // expected-error {{directive '#pragma omp target simd' cannot contain more than one 'if' clause with 'target' name modifier}} for (i = 0; i < argc; ++i) foo(); diff --git a/test/OpenMP/target_simd_is_device_ptr_messages.cpp b/test/OpenMP/target_simd_is_device_ptr_messages.cpp index 6d6bc247c8..1d8c90632f 100644 --- a/test/OpenMP/target_simd_is_device_ptr_messages.cpp +++ b/test/OpenMP/target_simd_is_device_ptr_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct ST { int *a; diff --git a/test/OpenMP/target_simd_lastprivate_messages.cpp b/test/OpenMP/target_simd_lastprivate_messages.cpp index 8b485840ce..6f1ef52d77 100644 --- a/test/OpenMP/target_simd_lastprivate_messages.cpp +++ b/test/OpenMP/target_simd_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; diff --git a/test/OpenMP/target_simd_linear_messages.cpp b/test/OpenMP/target_simd_linear_messages.cpp index 86e3cc43fb..5a2ef96ecd 100644 --- a/test/OpenMP/target_simd_linear_messages.cpp +++ b/test/OpenMP/target_simd_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -129,7 +129,7 @@ template int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp target simd linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) @@ -169,7 +169,7 @@ int foomain(I argc, C **argv) { #pragma omp target simd linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target simd linear(i) +#pragma omp target simd linear(i, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel @@ -214,7 +214,7 @@ int main(int argc, char **argv) { S4 e(4); // expected-note {{'e' defined here}} S5 g(5); // expected-note {{'g' defined here}} - int i; + int i, z; int &j = i; #pragma omp target simd linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) @@ -234,7 +234,7 @@ int main(int argc, char **argv) { #pragma omp target simd linear(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target simd linear(argc) +#pragma omp target simd linear(argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp target simd linear(S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/target_simd_loop_messages.cpp b/test/OpenMP/target_simd_loop_messages.cpp index 4ab02e7550..e634bd5857 100644 --- a/test/OpenMP/target_simd_loop_messages.cpp +++ b/test/OpenMP/target_simd_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized class S { int a; diff --git a/test/OpenMP/target_simd_map_messages.cpp b/test/OpenMP/target_simd_map_messages.cpp index 4b76042e45..a93d20eb35 100644 --- a/test/OpenMP/target_simd_map_messages.cpp +++ b/test/OpenMP/target_simd_map_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_simd_messages.cpp b/test/OpenMP/target_simd_messages.cpp index aa259c0696..37f5fae950 100644 --- a/test/OpenMP/target_simd_messages.cpp +++ b/test/OpenMP/target_simd_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_simd_misc_messages.c b/test/OpenMP/target_simd_misc_messages.c index 3965d28af5..83d73fa013 100644 --- a/test/OpenMP/target_simd_misc_messages.c +++ b/test/OpenMP/target_simd_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target simd'}} #pragma omp target simd diff --git a/test/OpenMP/target_simd_nowait_messages.cpp b/test/OpenMP/target_simd_nowait_messages.cpp index c7ab302cb0..1aee110969 100644 --- a/test/OpenMP/target_simd_nowait_messages.cpp +++ b/test/OpenMP/target_simd_nowait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_simd_private_messages.cpp b/test/OpenMP/target_simd_private_messages.cpp index f95d77c302..e1b9585d4d 100644 --- a/test/OpenMP/target_simd_private_messages.cpp +++ b/test/OpenMP/target_simd_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -106,7 +106,7 @@ template int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp target simd private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) @@ -138,7 +138,7 @@ int foomain(I argc, C **argv) { #pragma omp target simd private(argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target simd private(e, g) +#pragma omp target simd private(e, g, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp target simd private(h) // expected-error {{threadprivate or thread local variable cannot be private}} @@ -178,7 +178,7 @@ int main(int argc, char **argv) { S5 g(5); S6 s6(0.0) , s6_0(1.0); // expected-note {{in instantiation of member function 'S6::S6' requested here}} S7 > s7(0.0) , s7_0(1.0); - int i; + int i, z; int &j = i; #pragma omp target simd private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) @@ -198,7 +198,7 @@ int main(int argc, char **argv) { #pragma omp target simd private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target simd private(argc) +#pragma omp target simd private(argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp target simd private(S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/target_simd_reduction_messages.cpp b/test/OpenMP/target_simd_reduction_messages.cpp index e50159462c..551099418d 100644 --- a/test/OpenMP/target_simd_reduction_messages.cpp +++ b/test/OpenMP/target_simd_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -95,7 +95,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -140,7 +140,7 @@ T tmain(T argc) { #pragma omp target simd reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} @@ -217,7 +217,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -256,7 +256,7 @@ int main(int argc, char **argv) { #pragma omp target simd reduction(~ : argc) // expected-error {{expected unqualified-id}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target simd reduction(&& : argc) +#pragma omp target simd reduction(&& : argc, z) for (int i = 0; i < 10; ++i) foo(); #pragma omp target simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/target_simd_safelen_messages.cpp b/test/OpenMP/target_simd_safelen_messages.cpp index 993d707114..5e23ba1a74 100644 --- a/test/OpenMP/target_simd_safelen_messages.cpp +++ b/test/OpenMP/target_simd_safelen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_simd_simdlen_messages.cpp b/test/OpenMP/target_simd_simdlen_messages.cpp index 3a6e477886..848770e86a 100644 --- a/test/OpenMP/target_simd_simdlen_messages.cpp +++ b/test/OpenMP/target_simd_simdlen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_default_messages.cpp b/test/OpenMP/target_teams_default_messages.cpp index a144fa05f1..21fa8270ef 100644 --- a/test/OpenMP/target_teams_default_messages.cpp +++ b/test/OpenMP/target_teams_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -o - %s +// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized void foo(); diff --git a/test/OpenMP/target_teams_defaultmap_messages.cpp b/test/OpenMP/target_teams_defaultmap_messages.cpp index b1b2bdd389..36966bca8f 100644 --- a/test/OpenMP/target_teams_defaultmap_messages.cpp +++ b/test/OpenMP/target_teams_defaultmap_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_depend_messages.cpp b/test/OpenMP/target_teams_depend_messages.cpp index 79aef0d35a..b8e1657d01 100644 --- a/test/OpenMP/target_teams_depend_messages.cpp +++ b/test/OpenMP/target_teams_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_device_messages.cpp b/test/OpenMP/target_teams_device_messages.cpp index da56c470fb..292b6e161a 100644 --- a/test/OpenMP/target_teams_device_messages.cpp +++ b/test/OpenMP/target_teams_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -12,6 +12,7 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { + int z; #pragma omp target teams device // expected-error {{expected '(' after 'device'}} foo(); #pragma omp target teams device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -24,7 +25,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target teams device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} foo(); -#pragma omp target teams device (argc + argc) +#pragma omp target teams device (argc + argc + z) foo(); #pragma omp target teams device (argc), device (argc+1) // expected-error {{directive '#pragma omp target teams' cannot contain more than one 'device' clause}} foo(); diff --git a/test/OpenMP/target_teams_distribute_collapse_messages.cpp b/test/OpenMP/target_teams_distribute_collapse_messages.cpp index 7495a18443..43528dad0e 100644 --- a/test/OpenMP/target_teams_distribute_collapse_messages.cpp +++ b/test/OpenMP/target_teams_distribute_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_distribute_default_messages.cpp b/test/OpenMP/target_teams_distribute_default_messages.cpp index 539a296f26..fd834e7cba 100644 --- a/test/OpenMP/target_teams_distribute_default_messages.cpp +++ b/test/OpenMP/target_teams_distribute_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo(); diff --git a/test/OpenMP/target_teams_distribute_defaultmap_messages.cpp b/test/OpenMP/target_teams_distribute_defaultmap_messages.cpp index a31015255c..1842069227 100644 --- a/test/OpenMP/target_teams_distribute_defaultmap_messages.cpp +++ b/test/OpenMP/target_teams_distribute_defaultmap_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_distribute_depend_messages.cpp b/test/OpenMP/target_teams_distribute_depend_messages.cpp index 14c7745155..bb10a8f300 100644 --- a/test/OpenMP/target_teams_distribute_depend_messages.cpp +++ b/test/OpenMP/target_teams_distribute_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_distribute_device_messages.cpp b/test/OpenMP/target_teams_distribute_device_messages.cpp index aa62e09971..a50931d305 100644 --- a/test/OpenMP/target_teams_distribute_device_messages.cpp +++ b/test/OpenMP/target_teams_distribute_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -12,7 +12,7 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target teams distribute device // expected-error {{expected '(' after 'device'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -25,7 +25,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute device (argc + argc) +#pragma omp target teams distribute device (argc + argc + z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute device (argc), device (argc+1) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'device' clause}} for (i = 0; i < argc; ++i) foo(); diff --git a/test/OpenMP/target_teams_distribute_dist_schedule_messages.cpp b/test/OpenMP/target_teams_distribute_dist_schedule_messages.cpp index 2544b1b9ab..69c1e55eea 100644 --- a/test/OpenMP/target_teams_distribute_dist_schedule_messages.cpp +++ b/test/OpenMP/target_teams_distribute_dist_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -16,7 +16,7 @@ T tmain(T argc) { T b = argc, c, d, e, f, g; char ** argv; static T a; -// CHECK: static T a; + T z; #pragma omp target teams distribute dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); @@ -39,7 +39,7 @@ T tmain(T argc) { #pragma omp target teams distribute dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error2 {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target teams distribute dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'dist_schedule' clause}} +#pragma omp target teams distribute dist_schedule (static), dist_schedule (static, 1+z) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target teams distribute dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}} @@ -52,6 +52,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target teams distribute dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); @@ -73,7 +74,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target teams distribute dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'dist_schedule' clause}} +#pragma omp target teams distribute dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target teams distribute dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp b/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp index 3e00beac7f..8d53c3cbc0 100644 --- a/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp +++ b/test/OpenMP/target_teams_distribute_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -73,7 +73,7 @@ int main(int argc, char **argv) { S4 e(4); S5 g(5); S6 p; - int i; + int i, z; int &j = i; #pragma omp target teams distribute firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -113,7 +113,7 @@ int main(int argc, char **argv) { #pragma omp teams distribute firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}} 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 teams distribute firstprivate(da) +#pragma omp target teams distribute firstprivate(da, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute firstprivate(S2::S2s) diff --git a/test/OpenMP/target_teams_distribute_if_messages.cpp b/test/OpenMP/target_teams_distribute_if_messages.cpp index 94d82ab5ae..fd1ffb08cb 100644 --- a/test/OpenMP/target_teams_distribute_if_messages.cpp +++ b/test/OpenMP/target_teams_distribute_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { int i; + T z; #pragma omp target teams distribute if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); @@ -26,7 +27,7 @@ int tmain(T argc, S **argv) { #pragma omp target teams distribute if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute' are ignored}} +#pragma omp target teams distribute if (z+argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute if (argc > 0 ? argv[1] : argv[2]) @@ -84,7 +85,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target teams distribute if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); @@ -97,7 +98,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute' are ignored}} +#pragma omp target teams distribute if (argc+z)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute if (argc > 0 ? argv[1] : argv[2]) diff --git a/test/OpenMP/target_teams_distribute_lastprivate_messages.cpp b/test/OpenMP/target_teams_distribute_lastprivate_messages.cpp index a7e33d0e78..d02557c4e7 100644 --- a/test/OpenMP/target_teams_distribute_lastprivate_messages.cpp +++ b/test/OpenMP/target_teams_distribute_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; diff --git a/test/OpenMP/target_teams_distribute_loop_messages.cpp b/test/OpenMP/target_teams_distribute_loop_messages.cpp index 0ce8cbf71b..ecf364e211 100644 --- a/test/OpenMP/target_teams_distribute_loop_messages.cpp +++ b/test/OpenMP/target_teams_distribute_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized class S { int a; diff --git a/test/OpenMP/target_teams_distribute_map_messages.cpp b/test/OpenMP/target_teams_distribute_map_messages.cpp index 0de429736e..f14233f49c 100644 --- a/test/OpenMP/target_teams_distribute_map_messages.cpp +++ b/test/OpenMP/target_teams_distribute_map_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_distribute_messages.cpp b/test/OpenMP/target_teams_distribute_messages.cpp index 7b2080ae2b..a685acf7f3 100644 --- a/test/OpenMP/target_teams_distribute_messages.cpp +++ b/test/OpenMP/target_teams_distribute_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_distribute_misc_messages.c b/test/OpenMP/target_teams_distribute_misc_messages.c index 6d17b51261..8fbe7c055b 100644 --- a/test/OpenMP/target_teams_distribute_misc_messages.c +++ b/test/OpenMP/target_teams_distribute_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams distribute'}} #pragma omp target teams distribute diff --git a/test/OpenMP/target_teams_distribute_nowait_messages.cpp b/test/OpenMP/target_teams_distribute_nowait_messages.cpp index b7a9a2548b..75bab8001b 100644 --- a/test/OpenMP/target_teams_distribute_nowait_messages.cpp +++ b/test/OpenMP/target_teams_distribute_nowait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -o - %s +// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_distribute_num_teams_messages.cpp b/test/OpenMP/target_teams_distribute_num_teams_messages.cpp index 8b351dc8fb..c0a31fa19b 100644 --- a/test/OpenMP/target_teams_distribute_num_teams_messages.cpp +++ b/test/OpenMP/target_teams_distribute_num_teams_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target teams distribute num_teams(C) for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute num_teams(T) // expected-error {{'T' does not refer to a value}} @@ -30,7 +31,7 @@ T tmain(T argc) { for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i=0; i<100; i++) foo(); -#pragma omp target teams distribute num_teams(argc + argc) +#pragma omp target teams distribute num_teams(argc + argc + z) for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'num_teams' clause}} for (int i=0; i<100; i++) foo(); @@ -47,6 +48,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target teams distribute num_teams // expected-error {{expected '(' after 'num_teams'}} for (int i=0; i<100; i++) foo(); @@ -65,7 +67,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute num_teams (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i=0; i<100; i++) foo(); -#pragma omp target teams distribute num_teams (argc + argc) +#pragma omp target teams distribute num_teams (argc + argc+z) for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute num_teams (argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams distribute' cannot contain more than one 'num_teams' clause}} diff --git a/test/OpenMP/target_teams_distribute_parallel_for_collapse_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_collapse_messages.cpp index a866b79764..502e4047ea 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_collapse_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_distribute_parallel_for_default_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_default_messages.cpp index d5ea823858..00e0704a6c 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_default_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo(); diff --git a/test/OpenMP/target_teams_distribute_parallel_for_defaultmap_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_defaultmap_messages.cpp index 8de99aeb21..ae17c2bf9d 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_defaultmap_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_defaultmap_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_distribute_parallel_for_depend_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_depend_messages.cpp index d853771c0d..621f35808c 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_depend_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_distribute_parallel_for_device_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_device_messages.cpp index 64b682a601..e78807a09f 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_device_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -12,7 +12,7 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target teams distribute parallel for device // expected-error {{expected '(' after 'device'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -21,7 +21,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}} +#pragma omp target teams distribute parallel for device (argc+z)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (i = 0; i < argc; ++i) foo(); diff --git a/test/OpenMP/target_teams_distribute_parallel_for_dist_schedule_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_dist_schedule_messages.cpp index a8abaffb46..a0efad1866 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_dist_schedule_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_dist_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -16,7 +16,7 @@ T tmain(T argc) { T b = argc, c, d, e, f, g; char ** argv; static T a; -// CHECK: static T a; + T z; #pragma omp target teams distribute parallel for dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); @@ -39,7 +39,7 @@ T tmain(T argc) { #pragma omp target teams distribute parallel for dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error2 {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target teams distribute parallel for dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}} +#pragma omp target teams distribute parallel for dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target teams distribute parallel for dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}} @@ -52,6 +52,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target teams distribute parallel for dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); @@ -73,7 +74,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target teams distribute parallel for dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}} +#pragma omp target teams distribute parallel for dist_schedule (static), dist_schedule (static, 1+z) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target teams distribute parallel for dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/target_teams_distribute_parallel_for_firstprivate_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_firstprivate_messages.cpp index d7be6062eb..a03c781892 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_firstprivate_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -73,7 +73,7 @@ int main(int argc, char **argv) { S4 e(4); S5 g(5); S6 p; - int i; + int i, z; int &j = i; #pragma omp target teams distribute parallel for firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -112,7 +112,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for firstprivate(da) +#pragma omp target teams distribute parallel for firstprivate(da, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for firstprivate(S2::S2s) diff --git a/test/OpenMP/target_teams_distribute_parallel_for_if_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_if_messages.cpp index 328e191ed3..e1114028b6 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_if_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp target teams distribute parallel for if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -34,7 +34,7 @@ int tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for if(argc) +#pragma omp target teams distribute parallel for if(argc -z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for if(parallel // expected-error {{use of undeclared identifier 'parallel'}} expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); @@ -61,7 +61,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target teams distribute parallel for if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -92,7 +92,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for if(parallel : argc) +#pragma omp target teams distribute parallel for if(parallel : argc / z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for if(parallel : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target teams distribute parallel for'}} for (i = 0; i < argc; ++i) foo(); diff --git a/test/OpenMP/target_teams_distribute_parallel_for_is_device_ptr_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_is_device_ptr_messages.cpp index e19e46c57b..fdf98d40ea 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_is_device_ptr_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_is_device_ptr_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct ST { int *a; }; diff --git a/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp index d06628fef8..820010bea4 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; diff --git a/test/OpenMP/target_teams_distribute_parallel_for_loop_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_loop_messages.cpp index ca537dd976..a7fe130a0d 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_loop_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized class S { int a; diff --git a/test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp index f47655d686..c67b183534 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_map_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized void foo() { } @@ -61,7 +61,7 @@ T tmain(T argc) { T &j = i; T *k = &j; T x; - T y; + T y, z; T to, tofrom, always; const T (&l)[5] = da; @@ -102,7 +102,7 @@ T tmain(T argc) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for map(S2::S2sc) for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for map(x) +#pragma omp target teams distribute parallel for map(x, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for map(to: x) for (i = 0; i < argc; ++i) foo(); @@ -184,7 +184,7 @@ int main(int argc, char **argv) { int &j = i; int *k = &j; int x; - int y; + int y, z; int to, tofrom, always; const int (&l)[5] = da; @@ -232,7 +232,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for map(argv[1]) for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for map(ba) +#pragma omp target teams distribute parallel for map(ba, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for map(ca) for (i = 0; i < argc; ++i) foo(); diff --git a/test/OpenMP/target_teams_distribute_parallel_for_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_messages.cpp index e70c5df389..a9a7ca1617 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_distribute_parallel_for_misc_messages.c b/test/OpenMP/target_teams_distribute_parallel_for_misc_messages.c index 820eb11189..0e59e0d18f 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_misc_messages.c +++ b/test/OpenMP/target_teams_distribute_parallel_for_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams distribute parallel for'}} #pragma omp target teams distribute parallel for diff --git a/test/OpenMP/target_teams_distribute_parallel_for_nowait_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_nowait_messages.cpp index d0e679936e..f6b6061dd4 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_nowait_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_nowait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s +// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp-simd %s +// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_distribute_parallel_for_num_teams_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_num_teams_messages.cpp index ceb4fa567c..d80b6ea380 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_num_teams_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_num_teams_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target teams distribute parallel for num_teams(C) for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute parallel for num_teams(T) // expected-error {{'T' does not refer to a value}} @@ -30,7 +31,7 @@ T tmain(T argc) { for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute parallel for num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i=0; i<100; i++) foo(); -#pragma omp target teams distribute parallel for num_teams(argc + argc) +#pragma omp target teams distribute parallel for num_teams(argc + z) for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute parallel for num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'num_teams' clause}} for (int i=0; i<100; i++) foo(); @@ -47,6 +48,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target teams distribute parallel for num_teams // expected-error {{expected '(' after 'num_teams'}} for (int i=0; i<100; i++) foo(); @@ -65,7 +67,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for num_teams (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i=0; i<100; i++) foo(); -#pragma omp target teams distribute parallel for num_teams (argc + argc) +#pragma omp target teams distribute parallel for num_teams (argc + z) for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute parallel for num_teams (argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'num_teams' clause}} diff --git a/test/OpenMP/target_teams_distribute_parallel_for_num_threads_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_num_threads_messages.cpp index f558936afa..d4b0c02c43 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_num_threads_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_num_threads_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} T tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp target teams distribute parallel for num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -22,7 +22,7 @@ T tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}} +#pragma omp target teams distribute parallel for num_threads (argc - z)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for num_threads ((argc > 0) ? argv[1] : argv[2]) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}} for (i = 0; i < argc; ++i) foo(); @@ -41,7 +41,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target teams distribute parallel for num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -50,7 +50,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}} +#pragma omp target teams distribute parallel for num_threads (z - argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }} for (i = 0; i < argc; ++i) foo(); diff --git a/test/OpenMP/target_teams_distribute_parallel_for_private_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_private_messages.cpp index 86410b3faf..eb5a4d63ca 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_private_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; diff --git a/test/OpenMP/target_teams_distribute_parallel_for_proc_bind_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_proc_bind_messages.cpp index 659684e6f1..11deefb2aa 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_proc_bind_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_proc_bind_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/test/OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp index 01175deeca..296c0b0f66 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -89,7 +89,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -127,7 +127,7 @@ T tmain(T argc) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} +#pragma omp target teams distribute parallel for reduction(+ : z, ba) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); @@ -176,7 +176,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -218,7 +218,7 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} +#pragma omp target teams distribute parallel for reduction(- : da, z) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} for (int j=0; j<100; j++) foo(); diff --git a/test/OpenMP/target_teams_distribute_parallel_for_schedule_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_schedule_messages.cpp index 1f4f5f12e8..03bc0ff1d1 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_schedule_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} T tmain(T argc, S **argv) { + T z; // expected-error@+1 {{expected '(' after 'schedule'}} #pragma omp target teams distribute parallel for schedule for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; @@ -50,7 +51,7 @@ T tmain(T argc, S **argv) { for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-warning@+1 {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}} -#pragma omp target teams distribute parallel for schedule (dynamic, 1)) +#pragma omp target teams distribute parallel for schedule (dynamic, z+1)) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp target teams distribute parallel for schedule (guided, (ST > 0) ? 1 + ST : 2) @@ -81,6 +82,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; // expected-error@+1 {{expected '(' after 'schedule'}} #pragma omp target teams distribute parallel for schedule for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; @@ -114,7 +116,7 @@ int main(int argc, char **argv) { for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-warning@+1 {{extra tokens at the end of '#pragma omp target teams distribute parallel for' are ignored}} -#pragma omp target teams distribute parallel for schedule (static, 2+2)) +#pragma omp target teams distribute parallel for schedule (static, 2+2 + z)) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp target teams distribute parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2) diff --git a/test/OpenMP/target_teams_distribute_parallel_for_shared_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_shared_messages.cpp index f90a533edf..7519279607 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_shared_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -59,7 +59,7 @@ int main(int argc, char **argv) { const int da[5] = { 0 }; S4 e(4); S5 g(5); - int i; + int i, k; int &j = i; #pragma omp target teams distribute parallel for shared // expected-error {{expected '(' after 'shared'}} for (int j=0; j<100; j++) foo(); @@ -77,7 +77,7 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for shared (S1) // expected-error {{'S1' does not refer to a value}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for shared (a, b, c, d, f) +#pragma omp target teams distribute parallel for shared (a, b, c, d, f, k) for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for shared (argv[1]) // expected-error {{expected variable name}} for (int j=0; j<100; j++) foo(); diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_aligned_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_aligned_messages.cpp index 18685d2b30..4be19a4c76 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_aligned_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_aligned_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct B { static int ib[20]; // expected-note 0 {{'B::ib' declared here}} diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_messages.cpp index 4ca7a8ca9a..81adc34c4d 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_default_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_default_messages.cpp index d832d8cf16..7c46c964d2 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_default_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo(); diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_defaultmap_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_defaultmap_messages.cpp index c2c0e7be21..70361a1396 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_defaultmap_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_defaultmap_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_depend_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_depend_messages.cpp index 2690b01e22..d0735e4350 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_depend_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_device_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_device_messages.cpp index c7b3bc9098..bd68f36ae0 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_device_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -12,7 +12,7 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target teams distribute parallel for simd device // expected-error {{expected '(' after 'device'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -25,7 +25,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for simd device (argc + argc) +#pragma omp target teams distribute parallel for simd device (argc + argc + z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd device (argc), device (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'device' clause}} for (i = 0; i < argc; ++i) foo(); diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_dist_schedule_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_dist_schedule_messages.cpp index 079aaf69f5..ec634c8ac0 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_dist_schedule_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_dist_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -16,7 +16,7 @@ T tmain(T argc) { T b = argc, c, d, e, f, g; char ** argv; static T a; -// CHECK: static T a; + T z; #pragma omp target teams distribute parallel for simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); @@ -39,7 +39,7 @@ T tmain(T argc) { #pragma omp target teams distribute parallel for simd dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error2 {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target teams distribute parallel for simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}} +#pragma omp target teams distribute parallel for simd dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target teams distribute parallel for simd dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}} @@ -52,6 +52,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target teams distribute parallel for simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); @@ -73,7 +74,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for simd dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target teams distribute parallel for simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}} +#pragma omp target teams distribute parallel for simd dist_schedule (static), dist_schedule (static, 1+z) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target teams distribute parallel for simd dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_messages.cpp index 46a91c953b..d018421fa8 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -23,7 +23,7 @@ struct S1; // expected-note {{declared here}} expected-note{{forward declaration extern S1 a; class S2 { mutable int a; - + public: S2() : a(0) {} S2(const S2 &s2) : a(s2.a) {} @@ -36,7 +36,7 @@ const S2 ba[5]; class S3 { int a; S3 &operator=(const S3 &s3); - + public: S3() : a(0) {} // expected-note 2 {{candidate constructor not viable: requires 0 arguments, but 1 was provided}} S3(S3 &s3) : a(s3.a) {} // expected-note 2 {{candidate constructor not viable: 1st argument ('const S3') would lose const qualifier}} @@ -73,7 +73,7 @@ int main(int argc, char **argv) { S4 e(4); S5 g(5); S6 p; - int i; + int i, z; int &j = i; #pragma omp target teams distribute parallel for simd firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -112,7 +112,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for simd firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for simd firstprivate(da) +#pragma omp target teams distribute parallel for simd firstprivate(da, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd firstprivate(S2::S2s) diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_if_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_if_messages.cpp index 7554e5bc05..59c75893a1 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_if_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { - T i; + T i, k; #pragma omp target teams distribute parallel for simd if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -22,7 +22,7 @@ int tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for simd if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}} +#pragma omp target teams distribute parallel for simd if (k)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd if (argc > 0 ? argv[1] : argv[2]) for (i = 0; i < argc; ++i) foo(); @@ -73,7 +73,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, k; #pragma omp target teams distribute parallel for simd if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -82,7 +82,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for simd if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}} +#pragma omp target teams distribute parallel for simd if (k)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd if (argc > 0 ? argv[1] : argv[2]) for (i = 0; i < argc; ++i) foo(); diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_is_device_ptr_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_is_device_ptr_messages.cpp index 57abff3fb4..b368f2a3f5 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_is_device_ptr_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_is_device_ptr_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct ST { int *a; }; diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_messages.cpp index 2652079514..c273321068 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -78,7 +78,7 @@ template int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp target teams distribute parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} for (int k = 0; k < argc; ++k) ++k; @@ -110,7 +110,7 @@ int foomain(int argc, char **argv) { #pragma omp target teams distribute parallel for simd lastprivate(argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target teams distribute parallel for simd lastprivate(e, g) // expected-error 2 {{calling a private constructor of class 'S4'}} +#pragma omp target teams distribute parallel for simd lastprivate(e, g, z) // expected-error 2 {{calling a private constructor of class 'S4'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target teams distribute parallel for simd lastprivate(h) // expected-error {{threadprivate or thread local variable cannot be lastprivate}} @@ -152,7 +152,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; float k; #pragma omp target teams distribute parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -188,7 +188,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for simd lastprivate(2 * 2) // expected-error {{expected variable name}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for simd lastprivate(ba) +#pragma omp target teams distribute parallel for simd lastprivate(ba, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_linear_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_linear_messages.cpp index 029401a64c..111fe99bf8 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_linear_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_loop_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_loop_messages.cpp index 6c7cb79505..fda6b5ff31 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_loop_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized class S { int a; diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp index 64fe5f6e09..908184805a 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_map_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized void foo() { } @@ -61,7 +61,7 @@ T tmain(T argc) { T &j = i; T *k = &j; T x; - T y; + T y, z; T to, tofrom, always; const T (&l)[5] = da; @@ -88,7 +88,7 @@ T tmain(T argc) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd map(l[true:true]) for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for simd map(x) +#pragma omp target teams distribute parallel for simd map(x, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd map(tofrom: t[:I]) for (i = 0; i < argc; ++i) foo(); @@ -184,7 +184,7 @@ int main(int argc, char **argv) { int &j = i; int *k = &j; int x; - int y; + int y, z; int to, tofrom, always; const int (&l)[5] = da; @@ -218,7 +218,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd map(to) for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for simd map(to, x) +#pragma omp target teams distribute parallel for simd map(to, x, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd map(to x) // expected-error {{expected ',' or ')' in 'map' clause}} for (i = 0; i < argc; ++i) foo(); diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_messages.cpp index a98f7d83ec..f6050925d6 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_misc_messages.c b/test/OpenMP/target_teams_distribute_parallel_for_simd_misc_messages.c index 7005c7b027..07db3991bb 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_misc_messages.c +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams distribute parallel for simd'}} #pragma omp target teams distribute parallel for simd diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_nowait_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_nowait_messages.cpp index 458eaf72c3..0f13d35c06 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_nowait_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_nowait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s +// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp-simd %s +// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_num_teams_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_num_teams_messages.cpp index 6564f104a1..8d611f76ed 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_num_teams_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_num_teams_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target teams distribute parallel for simd num_teams(C) for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute parallel for simd num_teams(T) // expected-error {{'T' does not refer to a value}} @@ -30,7 +31,7 @@ T tmain(T argc) { for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute parallel for simd num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i=0; i<100; i++) foo(); -#pragma omp target teams distribute parallel for simd num_teams(argc + argc) +#pragma omp target teams distribute parallel for simd num_teams(argc + argc/z) for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute parallel for simd num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'num_teams' clause}} for (int i=0; i<100; i++) foo(); @@ -47,6 +48,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target teams distribute parallel for simd num_teams // expected-error {{expected '(' after 'num_teams'}} for (int i=0; i<100; i++) foo(); @@ -65,7 +67,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for simd num_teams (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i=0; i<100; i++) foo(); -#pragma omp target teams distribute parallel for simd num_teams (argc + argc) +#pragma omp target teams distribute parallel for simd num_teams (argc + argc-z) for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute parallel for simd num_teams (argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'num_teams' clause}} diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_num_threads_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_num_threads_messages.cpp index 58fab1e8df..397c83d199 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_num_threads_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_num_threads_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} T tmain(T argc, S **argv) { - T i; + T i, k; #pragma omp target teams distribute parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -32,7 +32,7 @@ T tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for simd num_threads (argc) +#pragma omp target teams distribute parallel for simd num_threads (argc + k) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd num_threads (N) // expected-error {{argument to 'num_threads' clause must be a strictly positive integer value}} for (i = 0; i < argc; ++i) foo(); @@ -41,7 +41,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, k; #pragma omp target teams distribute parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -50,7 +50,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}} +#pragma omp target teams distribute parallel for simd num_threads (k)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute parallel for simd num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }} for (i = 0; i < argc; ++i) foo(); diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_private_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_private_messages.cpp index 1f3a131326..8598fb6663 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_private_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_proc_bind_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_proc_bind_messages.cpp index 3ae5268667..ffac5417c9 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_proc_bind_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_proc_bind_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -o - %s +// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized void foo(); diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_messages.cpp index 6e298a7e6b..9336d94807 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -89,7 +89,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -121,7 +121,7 @@ T tmain(T argc) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target teams distribute parallel for simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); @@ -176,7 +176,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -210,7 +210,7 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} +#pragma omp target teams distribute parallel for simd reduction(min : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int j=0; j<100; j++) foo(); diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_safelen_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_safelen_messages.cpp index d05f071e91..14ac5da1b5 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_safelen_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_safelen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_schedule_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_schedule_messages.cpp index c24a543184..96b5aac2a5 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_schedule_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} T tmain(T argc, S **argv) { + T z; // expected-error@+1 {{expected '(' after 'schedule'}} #pragma omp target teams distribute parallel for simd schedule for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; @@ -50,7 +51,7 @@ T tmain(T argc, S **argv) { for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-warning@+1 {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}} -#pragma omp target teams distribute parallel for simd schedule (dynamic, 1)) +#pragma omp target teams distribute parallel for simd schedule (dynamic, 1 + z)) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp target teams distribute parallel for simd schedule (guided, (ST > 0) ? 1 + ST : 2) @@ -81,6 +82,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; // expected-error@+1 {{expected '(' after 'schedule'}} #pragma omp target teams distribute parallel for simd schedule for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; @@ -117,7 +119,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for simd schedule (static, 2+2)) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; -#pragma omp target teams distribute parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : 2) +#pragma omp target teams distribute parallel for simd schedule (dynamic, foobool(1) > 0 ? 1 : z) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error@+2 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'schedule' clause}} diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_shared_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_shared_messages.cpp index f59ecbd583..89d78744c9 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_shared_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -59,7 +59,7 @@ int main(int argc, char **argv) { const int da[5] = { 0 }; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; #pragma omp target teams distribute parallel for simd shared // expected-error {{expected '(' after 'shared'}} for (int j=0; j<100; j++) foo(); @@ -77,7 +77,7 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd shared (S1) // expected-error {{'S1' does not refer to a value}} for (int j=0; j<100; j++) foo(); - #pragma omp target teams distribute parallel for simd shared (a, b, c, d, f) + #pragma omp target teams distribute parallel for simd shared (a, b, c, d, f, z) for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd shared (argv[1]) // expected-error {{expected variable name}} for (int j=0; j<100; j++) foo(); diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_simdlen_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_simdlen_messages.cpp index 1c490582fd..e0c89d4c99 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_simdlen_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_simdlen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } @@ -33,9 +33,9 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp target teams distribute parallel for simd safelen (argc // expected-note {{to match this '('}} expected-error 2 {{expression is not an integral constant expression}} expected-note 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} expected-error {{expected ')'}} - for (int i = ST; i < N; i++) + for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; - + #pragma omp target teams distribute parallel for simd safelen (ST // expected-error {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; @@ -45,7 +45,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}} argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp target teams distribute parallel for simd safelen ((ST > 0) ? 1 + ST : 2) - for (int i = ST; i < N; i++) + for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #if __cplusplus >= 201103L @@ -102,7 +102,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for simd safelen (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute parallel for simd' are ignored}} for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; - + #if __cplusplus >= 201103L // expected-note@+2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif diff --git a/test/OpenMP/target_teams_distribute_parallel_for_simd_thread_limit_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_simd_thread_limit_messages.cpp index ea8b1a7751..1905b55478 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_simd_thread_limit_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_simd_thread_limit_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target teams distribute parallel for simd thread_limit(C) for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd thread_limit(T) // expected-error {{'T' does not refer to a value}} @@ -30,7 +31,7 @@ T tmain(T argc) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for simd thread_limit(argc + argc) +#pragma omp target teams distribute parallel for simd thread_limit(argc + argc + z) for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'thread_limit' clause}} for (int j=0; j<100; j++) foo(); @@ -47,6 +48,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target teams distribute parallel for simd thread_limit // expected-error {{expected '(' after 'thread_limit'}} for (int j=0; j<100; j++) foo(); @@ -65,7 +67,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for simd thread_limit (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for simd thread_limit (argc + argc) +#pragma omp target teams distribute parallel for simd thread_limit (argc + argc-z) for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for simd thread_limit (argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'thread_limit' clause}} diff --git a/test/OpenMP/target_teams_distribute_parallel_for_thread_limit_messages.cpp b/test/OpenMP/target_teams_distribute_parallel_for_thread_limit_messages.cpp index bd04e934a2..a015f9984e 100644 --- a/test/OpenMP/target_teams_distribute_parallel_for_thread_limit_messages.cpp +++ b/test/OpenMP/target_teams_distribute_parallel_for_thread_limit_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target teams distribute parallel for thread_limit(C) for (int j=0; j<100; j++) foo(); @@ -38,7 +39,7 @@ T tmain(T argc) { #pragma omp target teams distribute parallel for thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for thread_limit(argc + argc) +#pragma omp target teams distribute parallel for thread_limit(argc + argc + z) for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'thread_limit' clause}} @@ -60,6 +61,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target teams distribute parallel for thread_limit // expected-error {{expected '(' after 'thread_limit'}} for (int j=0; j<100; j++) foo(); @@ -78,7 +80,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute parallel for thread_limit (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute parallel for thread_limit (argc + argc) +#pragma omp target teams distribute parallel for thread_limit (argc -z + argc) for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute parallel for thread_limit (argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'thread_limit' clause}} diff --git a/test/OpenMP/target_teams_distribute_private_messages.cpp b/test/OpenMP/target_teams_distribute_private_messages.cpp index 93989a5840..a2233ed076 100644 --- a/test/OpenMP/target_teams_distribute_private_messages.cpp +++ b/test/OpenMP/target_teams_distribute_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; diff --git a/test/OpenMP/target_teams_distribute_reduction_messages.cpp b/test/OpenMP/target_teams_distribute_reduction_messages.cpp index bdde93bd93..b0f30e2eef 100644 --- a/test/OpenMP/target_teams_distribute_reduction_messages.cpp +++ b/test/OpenMP/target_teams_distribute_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -94,7 +94,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -126,7 +126,7 @@ T tmain(T argc) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target teams distribute reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); @@ -181,7 +181,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -213,7 +213,7 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} +#pragma omp target teams distribute reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}} expected-error {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); diff --git a/test/OpenMP/target_teams_distribute_shared_messages.cpp b/test/OpenMP/target_teams_distribute_shared_messages.cpp index 37e0aa1b5b..21b7060f77 100644 --- a/test/OpenMP/target_teams_distribute_shared_messages.cpp +++ b/test/OpenMP/target_teams_distribute_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_distribute_simd_aligned_messages.cpp b/test/OpenMP/target_teams_distribute_simd_aligned_messages.cpp index 2ec53ee99e..2e70bb3ac4 100644 --- a/test/OpenMP/target_teams_distribute_simd_aligned_messages.cpp +++ b/test/OpenMP/target_teams_distribute_simd_aligned_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct B { static int ib[20]; // expected-note 0 {{'B::ib' declared here}} diff --git a/test/OpenMP/target_teams_distribute_simd_collapse_messages.cpp b/test/OpenMP/target_teams_distribute_simd_collapse_messages.cpp index 6561091ec8..612fc728a8 100644 --- a/test/OpenMP/target_teams_distribute_simd_collapse_messages.cpp +++ b/test/OpenMP/target_teams_distribute_simd_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_distribute_simd_defaultmap_messages.cpp b/test/OpenMP/target_teams_distribute_simd_defaultmap_messages.cpp index b8ac8aee67..88f9125060 100644 --- a/test/OpenMP/target_teams_distribute_simd_defaultmap_messages.cpp +++ b/test/OpenMP/target_teams_distribute_simd_defaultmap_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_distribute_simd_depend_messages.cpp b/test/OpenMP/target_teams_distribute_simd_depend_messages.cpp index 7e2012ace3..2e1be6c725 100644 --- a/test/OpenMP/target_teams_distribute_simd_depend_messages.cpp +++ b/test/OpenMP/target_teams_distribute_simd_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_distribute_simd_device_messages.cpp b/test/OpenMP/target_teams_distribute_simd_device_messages.cpp index 1f47d1c726..993ff49125 100644 --- a/test/OpenMP/target_teams_distribute_simd_device_messages.cpp +++ b/test/OpenMP/target_teams_distribute_simd_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -12,7 +12,7 @@ bool foobool(int argc) { struct S1; // expected-note {{declared here}} int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target teams distribute simd device // expected-error {{expected '(' after 'device'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -25,7 +25,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute simd device (argc + argc) +#pragma omp target teams distribute simd device (argc + argc + z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd device (argc), device (argc+1) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'device' clause}} for (i = 0; i < argc; ++i) foo(); diff --git a/test/OpenMP/target_teams_distribute_simd_dist_schedule_messages.cpp b/test/OpenMP/target_teams_distribute_simd_dist_schedule_messages.cpp index b9fdc18a0e..507ddabd2f 100644 --- a/test/OpenMP/target_teams_distribute_simd_dist_schedule_messages.cpp +++ b/test/OpenMP/target_teams_distribute_simd_dist_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -16,7 +16,7 @@ T tmain(T argc) { T b = argc, c, d, e, f, g; char ** argv; static T a; -// CHECK: static T a; + T z; #pragma omp target teams distribute simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); @@ -39,7 +39,7 @@ T tmain(T argc) { #pragma omp target teams distribute simd dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error2 {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target teams distribute simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'dist_schedule' clause}} +#pragma omp target teams distribute simd dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target teams distribute simd dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}} @@ -52,6 +52,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target teams distribute simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); @@ -73,7 +74,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute simd dist_schedule (static, argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp target teams distribute simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'dist_schedule' clause}} +#pragma omp target teams distribute simd dist_schedule (static), dist_schedule (static, 1+z) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target teams distribute simd dist_schedule (static, S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/target_teams_distribute_simd_firstprivate_messages.cpp b/test/OpenMP/target_teams_distribute_simd_firstprivate_messages.cpp index 1ce3adc74d..82274fe00e 100644 --- a/test/OpenMP/target_teams_distribute_simd_firstprivate_messages.cpp +++ b/test/OpenMP/target_teams_distribute_simd_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -73,7 +73,7 @@ int main(int argc, char **argv) { S4 e(4); S5 g(5); S6 p; - int i; + int i, z; int &j = i; #pragma omp target teams distribute simd firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -112,7 +112,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute simd firstprivate(ca) // expected-error {{no matching constructor for initialization of 'S3'}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute simd firstprivate(da) +#pragma omp target teams distribute simd firstprivate(da, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd firstprivate(S2::S2s) diff --git a/test/OpenMP/target_teams_distribute_simd_if_messages.cpp b/test/OpenMP/target_teams_distribute_simd_if_messages.cpp index 43d8957f00..7134a8394c 100644 --- a/test/OpenMP/target_teams_distribute_simd_if_messages.cpp +++ b/test/OpenMP/target_teams_distribute_simd_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp target teams distribute simd if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -34,7 +34,7 @@ int tmain(T argc, S **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute simd if(argc) +#pragma omp target teams distribute simd if(argc * z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd if(target // expected-error {{use of undeclared identifier 'target'}} expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); @@ -57,7 +57,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target teams distribute simd if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -88,7 +88,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd if(target: argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute simd if(target: argc) +#pragma omp target teams distribute simd if(target: z/argc) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd if(target : argc) if (distribute:argc) // expected-error {{directive name modifier 'distribute' is not allowed for '#pragma omp target teams distribute simd'}} for (i = 0; i < argc; ++i) foo(); diff --git a/test/OpenMP/target_teams_distribute_simd_is_device_ptr_messages.cpp b/test/OpenMP/target_teams_distribute_simd_is_device_ptr_messages.cpp index 3408305692..3de17bf0ce 100644 --- a/test/OpenMP/target_teams_distribute_simd_is_device_ptr_messages.cpp +++ b/test/OpenMP/target_teams_distribute_simd_is_device_ptr_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct ST { int *a; }; diff --git a/test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp b/test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp index 1235f81a21..f7fb69f052 100644 --- a/test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp +++ b/test/OpenMP/target_teams_distribute_simd_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -78,7 +78,7 @@ template int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp target teams distribute simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} for (int k = 0; k < argc; ++k) ++k; @@ -110,7 +110,7 @@ int foomain(int argc, char **argv) { #pragma omp target teams distribute simd lastprivate(argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp target teams distribute simd lastprivate(e, g) // expected-error 2 {{calling a private constructor of class 'S4'}} +#pragma omp target teams distribute simd lastprivate(z, e, g) // expected-error 2 {{calling a private constructor of class 'S4'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target teams distribute simd lastprivate(h) // expected-error {{threadprivate or thread local variable cannot be lastprivate}} @@ -152,7 +152,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; float k; #pragma omp target teams distribute simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -188,7 +188,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute simd lastprivate(2 * 2) // expected-error {{expected variable name}} for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute simd lastprivate(ba) +#pragma omp target teams distribute simd lastprivate(ba, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd lastprivate(ca) // expected-error {{const-qualified variable without mutable fields cannot be lastprivate}} diff --git a/test/OpenMP/target_teams_distribute_simd_linear_messages.cpp b/test/OpenMP/target_teams_distribute_simd_linear_messages.cpp index f4131ed7ae..90b719c8d2 100644 --- a/test/OpenMP/target_teams_distribute_simd_linear_messages.cpp +++ b/test/OpenMP/target_teams_distribute_simd_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; diff --git a/test/OpenMP/target_teams_distribute_simd_loop_messages.cpp b/test/OpenMP/target_teams_distribute_simd_loop_messages.cpp index cba8e82056..1ec1e3bd8f 100644 --- a/test/OpenMP/target_teams_distribute_simd_loop_messages.cpp +++ b/test/OpenMP/target_teams_distribute_simd_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wno-openmp-target -Wuninitialized class S { int a; diff --git a/test/OpenMP/target_teams_distribute_simd_map_messages.cpp b/test/OpenMP/target_teams_distribute_simd_map_messages.cpp index 3806c4ecf5..313bd7400a 100644 --- a/test/OpenMP/target_teams_distribute_simd_map_messages.cpp +++ b/test/OpenMP/target_teams_distribute_simd_map_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized void foo() { } @@ -61,7 +61,7 @@ T tmain(T argc) { T &j = i; T *k = &j; T x; - T y; + T y, z; T to, tofrom, always; const T (&l)[5] = da; @@ -102,7 +102,7 @@ T tmain(T argc) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd map(S2::S2sc) for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute simd map(x) +#pragma omp target teams distribute simd map(x, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd map(to: x) for (i = 0; i < argc; ++i) foo(); @@ -184,7 +184,7 @@ int main(int argc, char **argv) { int &j = i; int *k = &j; int x; - int y; + int y, z; int to, tofrom, always; const int (&l)[5] = da; @@ -232,7 +232,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd map(argv[1]) for (i = 0; i < argc; ++i) foo(); -#pragma omp target teams distribute simd map(ba) +#pragma omp target teams distribute simd map(ba, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target teams distribute simd map(ca) for (i = 0; i < argc; ++i) foo(); diff --git a/test/OpenMP/target_teams_distribute_simd_messages.cpp b/test/OpenMP/target_teams_distribute_simd_messages.cpp index 6ee8073357..77e85f1c13 100644 --- a/test/OpenMP/target_teams_distribute_simd_messages.cpp +++ b/test/OpenMP/target_teams_distribute_simd_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_distribute_simd_misc_messages.c b/test/OpenMP/target_teams_distribute_simd_misc_messages.c index 397795ff6e..45f310ffdf 100644 --- a/test/OpenMP/target_teams_distribute_simd_misc_messages.c +++ b/test/OpenMP/target_teams_distribute_simd_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams distribute simd'}} #pragma omp target teams distribute simd diff --git a/test/OpenMP/target_teams_distribute_simd_nowait_messages.cpp b/test/OpenMP/target_teams_distribute_simd_nowait_messages.cpp index 25daa81eb7..1a9d0b5a51 100644 --- a/test/OpenMP/target_teams_distribute_simd_nowait_messages.cpp +++ b/test/OpenMP/target_teams_distribute_simd_nowait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s +// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp-simd %s +// RUN: %clang_cc1 -fsyntax-only -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_distribute_simd_num_teams_messages.cpp b/test/OpenMP/target_teams_distribute_simd_num_teams_messages.cpp index cdc5244fe1..7c44d6861e 100644 --- a/test/OpenMP/target_teams_distribute_simd_num_teams_messages.cpp +++ b/test/OpenMP/target_teams_distribute_simd_num_teams_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target teams distribute simd num_teams(C) for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute simd num_teams(T) // expected-error {{'T' does not refer to a value}} @@ -26,7 +27,7 @@ T tmain(T argc) { for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute simd num_teams(argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i=0; i<100; i++) foo(); -#pragma omp target teams distribute simd num_teams(argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute simd' are ignored}} +#pragma omp target teams distribute simd num_teams(argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute simd' are ignored}} for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute simd num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i=0; i<100; i++) foo(); @@ -47,6 +48,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target teams distribute simd num_teams // expected-error {{expected '(' after 'num_teams'}} for (int i=0; i<100; i++) foo(); @@ -59,7 +61,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute simd num_teams (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i=0; i<100; i++) foo(); -#pragma omp target teams distribute simd num_teams (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute simd' are ignored}} +#pragma omp target teams distribute simd num_teams (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp target teams distribute simd' are ignored}} for (int i=0; i<100; i++) foo(); #pragma omp target teams distribute simd num_teams (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} diff --git a/test/OpenMP/target_teams_distribute_simd_private_messages.cpp b/test/OpenMP/target_teams_distribute_simd_private_messages.cpp index 7edcaf19a3..2c53a4a1f8 100644 --- a/test/OpenMP/target_teams_distribute_simd_private_messages.cpp +++ b/test/OpenMP/target_teams_distribute_simd_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -59,7 +59,7 @@ int main(int argc, char **argv) { const int da[5] = { 0 }; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); - int i; + int i, k; int &j = i; #pragma omp target teams distribute simd private // expected-error {{expected '(' after 'private'}} @@ -89,7 +89,7 @@ int main(int argc, char **argv) { #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}} +#pragma omp target teams distribute simd private (k, argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target teams distribute simd private(ba) allocate(omp_thread_mem_alloc: ba) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'target teams distribute simd' directive}} diff --git a/test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp b/test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp index c033c05802..84da687171 100644 --- a/test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp +++ b/test/OpenMP/target_teams_distribute_simd_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -89,7 +89,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -121,9 +121,9 @@ T tmain(T argc) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target teams distribute simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} +#pragma omp target teams distribute simd reduction(min : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} for (int j=0; j<100; j++) foo(); @@ -176,7 +176,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -216,7 +216,7 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} +#pragma omp target teams distribute simd reduction(* : ca, z) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); diff --git a/test/OpenMP/target_teams_distribute_simd_safelen_messages.cpp b/test/OpenMP/target_teams_distribute_simd_safelen_messages.cpp index da5c8eb75d..36af17e935 100644 --- a/test/OpenMP/target_teams_distribute_simd_safelen_messages.cpp +++ b/test/OpenMP/target_teams_distribute_simd_safelen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_distribute_simd_shared_messages.cpp b/test/OpenMP/target_teams_distribute_simd_shared_messages.cpp index 3147baedae..a32aa2207a 100644 --- a/test/OpenMP/target_teams_distribute_simd_shared_messages.cpp +++ b/test/OpenMP/target_teams_distribute_simd_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -59,7 +59,7 @@ int main(int argc, char **argv) { const int da[5] = { 0 }; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; #pragma omp target teams distribute simd shared // expected-error {{expected '(' after 'shared'}} for (int j=0; j<100; j++) foo(); @@ -73,7 +73,7 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd shared (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int j=0; j<100; j++) foo(); - #pragma omp target teams distribute simd shared (argc) + #pragma omp target teams distribute simd shared (argc, z) for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd shared (S1) // expected-error {{'S1' does not refer to a value}} for (int j=0; j<100; j++) foo(); diff --git a/test/OpenMP/target_teams_distribute_simd_simdlen_messages.cpp b/test/OpenMP/target_teams_distribute_simd_simdlen_messages.cpp index 851fff36f2..322c64607d 100644 --- a/test/OpenMP/target_teams_distribute_simd_simdlen_messages.cpp +++ b/test/OpenMP/target_teams_distribute_simd_simdlen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_distribute_simd_thread_limit_messages.cpp b/test/OpenMP/target_teams_distribute_simd_thread_limit_messages.cpp index 593650b38c..fcdcde53f3 100644 --- a/test/OpenMP/target_teams_distribute_simd_thread_limit_messages.cpp +++ b/test/OpenMP/target_teams_distribute_simd_thread_limit_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target teams distribute simd thread_limit(C) for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd thread_limit(T) // expected-error {{'T' does not refer to a value}} @@ -30,7 +31,7 @@ T tmain(T argc) { for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute simd thread_limit(argc + argc) +#pragma omp target teams distribute simd thread_limit(argc + argc + z) for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'thread_limit' clause}} for (int j=0; j<100; j++) foo(); @@ -47,6 +48,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target teams distribute simd thread_limit // expected-error {{expected '(' after 'thread_limit'}} for (int j=0; j<100; j++) foo(); @@ -65,7 +67,7 @@ int main(int argc, char **argv) { #pragma omp target teams distribute simd thread_limit (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int j=0; j<100; j++) foo(); -#pragma omp target teams distribute simd thread_limit (argc + argc) +#pragma omp target teams distribute simd thread_limit (argc + argc - z) for (int j=0; j<100; j++) foo(); #pragma omp target teams distribute simd thread_limit (argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'thread_limit' clause}} diff --git a/test/OpenMP/target_teams_firstprivate_messages.cpp b/test/OpenMP/target_teams_firstprivate_messages.cpp index 9f6eb8ad81..7958d6f494 100644 --- a/test/OpenMP/target_teams_firstprivate_messages.cpp +++ b/test/OpenMP/target_teams_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -74,7 +74,7 @@ int main(int argc, char **argv) { const int da[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; #pragma omp target teams firstprivate // expected-error {{expected '(' after 'firstprivate'}} foo(); @@ -98,7 +98,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target teams allocate(omp_thread_mem_alloc: ba) firstprivate(ba) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'target teams' directive}} foo(); -#pragma omp target teams firstprivate(ca) +#pragma omp target teams firstprivate(ca, z) foo(); #pragma omp target teams firstprivate(da) foo(); diff --git a/test/OpenMP/target_teams_if_messages.cpp b/test/OpenMP/target_teams_if_messages.cpp index 84c900a41a..8d3d690d63 100644 --- a/test/OpenMP/target_teams_if_messages.cpp +++ b/test/OpenMP/target_teams_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp target teams if // expected-error {{expected '(' after 'if'}} foo(); #pragma omp target teams if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -21,7 +22,7 @@ int tmain(T argc, S **argv) { foo(); #pragma omp target teams if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} foo(); -#pragma omp target teams if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target teams' are ignored}} +#pragma omp target teams if (z)) // expected-warning {{extra tokens at the end of '#pragma omp target teams' are ignored}} foo(); #pragma omp target teams if (argc > 0 ? argv[1] : argv[2]) foo(); @@ -52,6 +53,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp target teams if // expected-error {{expected '(' after 'if'}} foo(); #pragma omp target teams if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -80,7 +82,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target teams if(target : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} foo(); -#pragma omp target teams if(target : argc) +#pragma omp target teams if(target : z) foo(); #pragma omp target teams if(target : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target teams'}} foo(); diff --git a/test/OpenMP/target_teams_is_device_ptr_messages.cpp b/test/OpenMP/target_teams_is_device_ptr_messages.cpp index 8ae6d7fed0..1885d1e699 100644 --- a/test/OpenMP/target_teams_is_device_ptr_messages.cpp +++ b/test/OpenMP/target_teams_is_device_ptr_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp -ferror-limit 200 %s -Wuninitialized -// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s +// RUN: %clang_cc1 -std=c++11 -verify -fopenmp-simd -ferror-limit 200 %s -Wuninitialized struct ST { int *a; }; diff --git a/test/OpenMP/target_teams_map_messages.cpp b/test/OpenMP/target_teams_map_messages.cpp index 8608756bd4..d70598b384 100644 --- a/test/OpenMP/target_teams_map_messages.cpp +++ b/test/OpenMP/target_teams_map_messages.cpp @@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 200 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 200 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 200 %s -Wno-openmp-target -// RUN: %clang_cc1 -DCCODE -verify -fopenmp -ferror-limit 200 -x c %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 200 %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -DCCODE -verify -fopenmp -ferror-limit 200 -x c %s -Wno-openmp-target -Wuninitialized #ifdef CCODE void foo(int arg) { const int n = 0; diff --git a/test/OpenMP/target_teams_messages.cpp b/test/OpenMP/target_teams_messages.cpp index 362767ef1d..406b9841f5 100644 --- a/test/OpenMP/target_teams_messages.cpp +++ b/test/OpenMP/target_teams_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_nowait_messages.cpp b/test/OpenMP/target_teams_nowait_messages.cpp index aeb1829403..bed2f97989 100644 --- a/test/OpenMP/target_teams_nowait_messages.cpp +++ b/test/OpenMP/target_teams_nowait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -o - %s +// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_num_teams_messages.cpp b/test/OpenMP/target_teams_num_teams_messages.cpp index 9134af640c..94f4c0f811 100644 --- a/test/OpenMP/target_teams_num_teams_messages.cpp +++ b/test/OpenMP/target_teams_num_teams_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target teams num_teams(C) foo(); #pragma omp target teams num_teams(T) // expected-error {{'T' does not refer to a value}} @@ -30,7 +31,7 @@ T tmain(T argc) { foo(); #pragma omp target teams num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} foo(); -#pragma omp target teams num_teams(argc + argc) +#pragma omp target teams num_teams(argc + argc + z) foo(); #pragma omp target teams num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams' cannot contain more than one 'num_teams' clause}} foo(); @@ -47,6 +48,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target teams num_teams // expected-error {{expected '(' after 'num_teams'}} foo(); @@ -65,7 +67,7 @@ int main(int argc, char **argv) { #pragma omp target teams num_teams (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} foo(); -#pragma omp target teams num_teams (argc + argc) +#pragma omp target teams num_teams (argc + argc*z) foo(); #pragma omp target teams num_teams (argc), num_teams (argc+1) // expected-error {{directive '#pragma omp target teams' cannot contain more than one 'num_teams' clause}} diff --git a/test/OpenMP/target_teams_private_messages.cpp b/test/OpenMP/target_teams_private_messages.cpp index 7714113af7..85309e953b 100644 --- a/test/OpenMP/target_teams_private_messages.cpp +++ b/test/OpenMP/target_teams_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -66,7 +66,7 @@ int main(int argc, char **argv) { const int da[5] = { 0 }; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; #pragma omp target teams private // expected-error {{expected '(' after 'private'}} foo(); @@ -104,7 +104,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target teams firstprivate(i) private(i) // expected-error {{firstprivate variable cannot be private}} expected-note {{defined as firstprivate}} foo(); -#pragma omp target teams private(i) +#pragma omp target teams private(i, z) foo(); #pragma omp target teams private(j) foo(); diff --git a/test/OpenMP/target_teams_reduction_messages.cpp b/test/OpenMP/target_teams_reduction_messages.cpp index 2d8a47b7f8..77684296fd 100644 --- a/test/OpenMP/target_teams_reduction_messages.cpp +++ b/test/OpenMP/target_teams_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -94,7 +94,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -126,7 +126,7 @@ T tmain(T argc) { foo(); #pragma omp target teams reduction(^ : T) // expected-error {{'T' does not refer to a value}} foo(); -#pragma omp target teams reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp target teams reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} foo(); #pragma omp target teams reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} foo(); @@ -191,7 +191,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -219,7 +219,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target teams reduction(~ : argc) // expected-error {{expected unqualified-id}} foo(); -#pragma omp target teams reduction(&& : argc) +#pragma omp target teams reduction(&& : argc, z) foo(); #pragma omp target teams reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} foo(); diff --git a/test/OpenMP/target_teams_shared_messages.cpp b/test/OpenMP/target_teams_shared_messages.cpp index 3fb84967b9..5a0947305a 100644 --- a/test/OpenMP/target_teams_shared_messages.cpp +++ b/test/OpenMP/target_teams_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_teams_thread_limit_messages.cpp b/test/OpenMP/target_teams_thread_limit_messages.cpp index 4b0a4b05c8..0693e64a71 100644 --- a/test/OpenMP/target_teams_thread_limit_messages.cpp +++ b/test/OpenMP/target_teams_thread_limit_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target teams thread_limit(C) foo(); #pragma omp target teams thread_limit(T) // expected-error {{'T' does not refer to a value}} @@ -30,7 +31,7 @@ T tmain(T argc) { foo(); #pragma omp target teams thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} foo(); -#pragma omp target teams thread_limit(argc + argc) +#pragma omp target teams thread_limit(argc + argc + z) foo(); #pragma omp target teams thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams' cannot contain more than one 'thread_limit' clause}} foo(); @@ -47,6 +48,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target teams thread_limit // expected-error {{expected '(' after 'thread_limit'}} foo(); @@ -65,7 +67,7 @@ int main(int argc, char **argv) { #pragma omp target teams thread_limit (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} foo(); -#pragma omp target teams thread_limit (argc + argc) +#pragma omp target teams thread_limit (argc + argc/ z) foo(); #pragma omp target teams thread_limit (argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp target teams' cannot contain more than one 'thread_limit' clause}} diff --git a/test/OpenMP/target_update_depend_messages.cpp b/test/OpenMP/target_update_depend_messages.cpp index 016219c073..e09284f729 100644 --- a/test/OpenMP/target_update_depend_messages.cpp +++ b/test/OpenMP/target_update_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_update_device_messages.cpp b/test/OpenMP/target_update_device_messages.cpp index 228b4a800a..8b4aefaf58 100644 --- a/test/OpenMP/target_update_device_messages.cpp +++ b/test/OpenMP/target_update_device_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,14 +13,14 @@ struct S1; // expected-note 2 {{declared here}} template int tmain(T argc, S **argv) { - int i; + int i, z; #pragma omp target update to(i) device // expected-error {{expected '(' after 'device'}} #pragma omp target update to(i) device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target update to(i) device () // expected-error {{expected expression}} #pragma omp target update to(i) device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target update to(i) device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target update' are ignored}} #pragma omp target update from(i) device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} -#pragma omp target update from(i) device (argc + argc) +#pragma omp target update from(i) device (argc + z) #pragma omp target update from(i) device (argc), device (argc+1) // expected-error {{directive '#pragma omp target update' cannot contain more than one 'device' clause}} #pragma omp target update from(i) device (S1) // expected-error {{'S1' does not refer to a value}} #pragma omp target update from(i) device (3.14) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'double'}} @@ -28,14 +28,14 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int j; + int j, z; #pragma omp target update to(j) device // expected-error {{expected '(' after 'device'}} #pragma omp target update from(j) device ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target update to(j) device () // expected-error {{expected expression}} #pragma omp target update from(j) device (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target update to(j) device (argc)) // expected-warning {{extra tokens at the end of '#pragma omp target update' are ignored}} #pragma omp target update from(j) device (argc > 0 ? argv[1] : argv[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} -#pragma omp target update to(j) device (argc + argc) +#pragma omp target update to(j) device (z + argc) #pragma omp target update from(j) device (argc), device (argc+1) // expected-error {{directive '#pragma omp target update' cannot contain more than one 'device' clause}} #pragma omp target update to(j) device (S1) // expected-error {{'S1' does not refer to a value}} #pragma omp target update from(j) device (-2) // expected-error {{argument to 'device' clause must be a non-negative integer value}} diff --git a/test/OpenMP/target_update_from_messages.cpp b/test/OpenMP/target_update_from_messages.cpp index e5a1f045e2..b5e7c5004e 100644 --- a/test/OpenMP/target_update_from_messages.cpp +++ b/test/OpenMP/target_update_from_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_update_if_messages.cpp b/test/OpenMP/target_update_if_messages.cpp index 4f229a768c..9ded332b04 100644 --- a/test/OpenMP/target_update_if_messages.cpp +++ b/test/OpenMP/target_update_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -24,11 +24,11 @@ int tmain(T argc, S **argv) { #pragma omp target update from(n) if (S) // expected-error {{'S' does not refer to a value}} #pragma omp target update to(n) if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target update from(n) if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}} -#pragma omp target update to(n) if(argc) +#pragma omp target update to(n) if(argc + n) #pragma omp target update from(n) if(target update // expected-error {{use of undeclared identifier 'target'}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target update to(n) if(target update : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target update from(n) if(target update : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} -#pragma omp target update to(n) if(target update : argc) +#pragma omp target update to(n) if(target update : argc + n) #pragma omp target update from(n) if(target update : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target update'}} #pragma omp target update to(n) if(target update : argc) if (target update:argc) // expected-error {{directive '#pragma omp target update' cannot contain more than one 'if' clause with 'target update' name modifier}} #pragma omp target update from(n) if(target update : argc) if (argc) // expected-error {{no more 'if' clause is allowed}} expected-note {{previous clause with directive name modifier specified here}} @@ -52,7 +52,7 @@ int main(int argc, char **argv) { #pragma omp target update to(m) if(target update // expected-error {{use of undeclared identifier 'target'}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target update from(m) if(target update : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp target update to(m) if(target update : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} -#pragma omp target update from(m) if(target update : argc) +#pragma omp target update from(m) if(target update : argc + m) #pragma omp target update to(m) if(target update : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp target update'}} #pragma omp target update from(m) if(target update : argc) if (target update:argc) // expected-error {{directive '#pragma omp target update' cannot contain more than one 'if' clause with 'target update' name modifier}} #pragma omp target update to(m) if(target update : argc) if (argc) // expected-error {{no more 'if' clause is allowed}} expected-note {{previous clause with directive name modifier specified here}} diff --git a/test/OpenMP/target_update_messages.cpp b/test/OpenMP/target_update_messages.cpp index 68b76344b9..0adb87584e 100644 --- a/test/OpenMP/target_update_messages.cpp +++ b/test/OpenMP/target_update_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/target_update_nowait_messages.cpp b/test/OpenMP/target_update_nowait_messages.cpp index fb3d035af9..fc0314a318 100644 --- a/test/OpenMP/target_update_nowait_messages.cpp +++ b/test/OpenMP/target_update_nowait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized int main(int argc, char **argv) { int i; diff --git a/test/OpenMP/target_update_to_messages.cpp b/test/OpenMP/target_update_to_messages.cpp index 58f6aee234..296b25843a 100644 --- a/test/OpenMP/target_update_to_messages.cpp +++ b/test/OpenMP/target_update_to_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wno-openmp-target -Wuninitialized void foo() { } diff --git a/test/OpenMP/task_default_messages.cpp b/test/OpenMP/task_default_messages.cpp index 0eb26856e7..4826c253aa 100644 --- a/test/OpenMP/task_default_messages.cpp +++ b/test/OpenMP/task_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/test/OpenMP/task_depend_messages.cpp b/test/OpenMP/task_depend_messages.cpp index 12d1d1a684..63ad847481 100644 --- a/test/OpenMP/task_depend_messages.cpp +++ b/test/OpenMP/task_depend_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/task_final_messages.cpp b/test/OpenMP/task_final_messages.cpp index 49b9bfe204..7cfdf8c635 100644 --- a/test/OpenMP/task_final_messages.cpp +++ b/test/OpenMP/task_final_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,11 +13,12 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp task final // expected-error {{expected '(' after 'final'}} #pragma omp task final ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task final () // expected-error {{expected expression}} #pragma omp task final (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} - #pragma omp task final (argc)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}} + #pragma omp task final (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}} #pragma omp task final (argc > 0 ? argv[1] : argv[2]) #pragma omp task final (foobool(argc)), final (true) // expected-error {{directive '#pragma omp task' cannot contain more than one 'final' clause}} #pragma omp task final (S) // expected-error {{'S' does not refer to a value}} @@ -30,11 +31,12 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp task final // expected-error {{expected '(' after 'final'}} #pragma omp task final ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task final () // expected-error {{expected expression}} #pragma omp task final (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} - #pragma omp task final (argc)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}} + #pragma omp task final (z+argc)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}} #pragma omp task final (argc > 0 ? argv[1] : argv[2]) #pragma omp task final (foobool(argc)), final (true) // expected-error {{directive '#pragma omp task' cannot contain more than one 'final' clause}} #pragma omp task final (S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/task_firstprivate_messages.cpp b/test/OpenMP/task_firstprivate_messages.cpp index f299c75518..b8ff2cdebc 100644 --- a/test/OpenMP/task_firstprivate_messages.cpp +++ b/test/OpenMP/task_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -92,7 +92,7 @@ int main(int argc, char **argv) { const int da[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; static int m; #pragma omp task firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -106,7 +106,7 @@ int main(int argc, char **argv) { #pragma omp task firstprivate(a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} #pragma omp task firstprivate(argv[1]) // expected-error {{expected variable name}} #pragma omp task allocate(omp_thread_mem_alloc: ba) firstprivate(ba) // expected-warning {{allocator with the 'thread' trait access has unspecified behavior on 'task' directive}} -#pragma omp task firstprivate(ca) +#pragma omp task firstprivate(ca,z ) #pragma omp task firstprivate(da) #pragma omp task firstprivate(S2::S2s) #pragma omp task firstprivate(S2::S2sc) diff --git a/test/OpenMP/task_if_messages.cpp b/test/OpenMP/task_if_messages.cpp index fca57bb05d..305af22149 100644 --- a/test/OpenMP/task_if_messages.cpp +++ b/test/OpenMP/task_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp task if // expected-error {{expected '(' after 'if'}} #pragma omp task if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task if () // expected-error {{expected expression}} @@ -23,7 +24,7 @@ int tmain(T argc, S **argv) { #pragma omp task if (S) // expected-error {{'S' does not refer to a value}} #pragma omp task if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}} - #pragma omp task if(argc) + #pragma omp task if(argc + z) #pragma omp task if(task : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task if(task : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task if(task : argc) @@ -36,6 +37,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { +int z; #pragma omp task if // expected-error {{expected '(' after 'if'}} #pragma omp task if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task if () // expected-error {{expected expression}} @@ -50,7 +52,7 @@ int main(int argc, char **argv) { #pragma omp task if(if(tmain(argc, argv) // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task if(task : // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task if(task : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} - #pragma omp task if(task : argc) + #pragma omp task if(task : argc + z) #pragma omp task if(task : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp task'}} #pragma omp task if(task : argc) if (task:argc) // expected-error {{directive '#pragma omp task' cannot contain more than one 'if' clause with 'task' name modifier}} #pragma omp task if(task : argc) if (argc) // expected-error {{no more 'if' clause is allowed}} expected-note {{previous clause with directive name modifier specified here}} diff --git a/test/OpenMP/task_messages.cpp b/test/OpenMP/task_messages.cpp index 92bb14983b..e52b2fae5c 100644 --- a/test/OpenMP/task_messages.cpp +++ b/test/OpenMP/task_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -std=c++11 -o - %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/task_priority_messages.cpp b/test/OpenMP/task_priority_messages.cpp index 2e184ce1a9..140e8f0b71 100644 --- a/test/OpenMP/task_priority_messages.cpp +++ b/test/OpenMP/task_priority_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,12 +13,13 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp task priority // expected-error {{expected '(' after 'priority'}} #pragma omp task priority ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task priority () // expected-error {{expected expression}} #pragma omp task priority (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}} - #pragma omp task priority (argc > 0 ? argv[1][0] : argv[2][argc]) + #pragma omp task priority (argc > 0 ? argv[1][0] : argv[2][argc] + z) #pragma omp task priority (foobool(argc)), priority (true) // expected-error {{directive '#pragma omp task' cannot contain more than one 'priority' clause}} #pragma omp task priority (S) // expected-error {{'S' does not refer to a value}} #pragma omp task priority (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -30,12 +31,13 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { +int z; #pragma omp task priority // expected-error {{expected '(' after 'priority'}} #pragma omp task priority ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task priority () // expected-error {{expected expression}} #pragma omp task priority (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} #pragma omp task priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}} - #pragma omp task priority (argc > 0 ? argv[1][0] : argv[2][argc]) + #pragma omp task priority (argc > 0 ? argv[1][0] : argv[2][argc] - z) #pragma omp task priority (foobool(argc)), priority (true) // expected-error {{directive '#pragma omp task' cannot contain more than one 'priority' clause}} #pragma omp task priority (S1) // expected-error {{'S1' does not refer to a value}} #pragma omp task priority (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}} diff --git a/test/OpenMP/task_private_messages.cpp b/test/OpenMP/task_private_messages.cpp index 934f5aad8c..df082a5631 100644 --- a/test/OpenMP/task_private_messages.cpp +++ b/test/OpenMP/task_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -75,7 +75,7 @@ int main(int argc, char **argv) { const int da[5] = {0}; // expected-note {{'da' defined here}} S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; #pragma omp task private // expected-error {{expected '(' after 'private'}} #pragma omp task private( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -85,7 +85,7 @@ 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 1 {{const-qualified variable without mutable fields cannot be private}} expected-error 2 {{const-qualified variable cannot be private}} +#pragma omp task private(z, 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) allocate , allocate(, allocate(omp_default , allocate(omp_default_mem_alloc, allocate(omp_default_mem_alloc:, allocate(omp_default_mem_alloc: argc, allocate(omp_default_mem_alloc: argv), allocate(argv) // expected-error {{expected '(' after 'allocate'}} expected-error 2 {{expected expression}} expected-error 2 {{expected ')'}} expected-error {{use of undeclared identifier 'omp_default'}} expected-note 2 {{to match this '('}} #pragma omp task private(ca) // expected-error {{const-qualified variable without mutable fields cannot be private}} diff --git a/test/OpenMP/task_shared_messages.cpp b/test/OpenMP/task_shared_messages.cpp index bdd46ab428..309d56b423 100644 --- a/test/OpenMP/task_shared_messages.cpp +++ b/test/OpenMP/task_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -63,7 +63,7 @@ int main(int argc, char **argv) { const int da[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; #pragma omp task shared // expected-error {{expected '(' after 'shared'}} foo(); @@ -77,7 +77,7 @@ int main(int argc, char **argv) { foo(); #pragma omp task shared(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} foo(); -#pragma omp task shared(argc) +#pragma omp task shared(argc, z) foo(); #pragma omp task shared(S1) // expected-error {{'S1' does not refer to a value}} foo(); diff --git a/test/OpenMP/taskgroup_messages.cpp b/test/OpenMP/taskgroup_messages.cpp index dfb4725280..f7503ff3c1 100644 --- a/test/OpenMP/taskgroup_messages.cpp +++ b/test/OpenMP/taskgroup_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized int foo(); diff --git a/test/OpenMP/taskgroup_task_reduction_messages.cpp b/test/OpenMP/taskgroup_task_reduction_messages.cpp index 64d7c6c3ca..fe7baf4091 100644 --- a/test/OpenMP/taskgroup_task_reduction_messages.cpp +++ b/test/OpenMP/taskgroup_task_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -85,7 +85,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -137,7 +137,7 @@ T tmain(T argc) { foo(); #pragma omp taskgroup task_reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} foo(); -#pragma omp taskgroup task_reduction(+ : o) // expected-error 2 {{no viable overloaded '='}} +#pragma omp taskgroup task_reduction(+ : o, z) // expected-error 2 {{no viable overloaded '='}} foo(); #pragma omp parallel private(k) #pragma omp taskgroup task_reduction(+ : p), task_reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'task_reduction' must reference the same object in all threads}} @@ -178,7 +178,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -232,7 +232,7 @@ int main(int argc, char **argv) { foo(); #pragma omp taskgroup task_reduction(+ : h, k, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be reduction}} foo(); -#pragma omp taskgroup task_reduction(+ : o) // expected-error {{no viable overloaded '='}} +#pragma omp taskgroup task_reduction(+ : o, z) // expected-error {{no viable overloaded '='}} foo(); #pragma omp parallel private(k) #pragma omp taskgroup task_reduction(+ : p), task_reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'task_reduction' must reference the same object in all threads}} diff --git a/test/OpenMP/taskloop_collapse_messages.cpp b/test/OpenMP/taskloop_collapse_messages.cpp index 091b8b8321..5551a0254e 100644 --- a/test/OpenMP/taskloop_collapse_messages.cpp +++ b/test/OpenMP/taskloop_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } @@ -29,7 +29,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}} // expected-error@+3 {{expected ')'}} expected-note@+3 {{to match this '('}} // expected-error@+2 2 {{expression is not an integral constant expression}} // expected-note@+1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} - #pragma omp taskloop collapse (argc + #pragma omp taskloop collapse (argc for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}} #pragma omp taskloop collapse (ST // expected-error {{expected ')'}} expected-note {{to match this '('}} diff --git a/test/OpenMP/taskloop_final_messages.cpp b/test/OpenMP/taskloop_final_messages.cpp index d53b12322e..f7ef2959df 100644 --- a/test/OpenMP/taskloop_final_messages.cpp +++ b/test/OpenMP/taskloop_final_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp taskloop final // expected-error {{expected '(' after 'final'}} for (int i = 0; i < 10; ++i) foo(); @@ -28,7 +29,7 @@ int tmain(T argc, S **argv) { #pragma omp taskloop final(argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop final(argc > 0 ? argv[1] : argv[2]) +#pragma omp taskloop final(argc > 0 ? argv[1] : argv[2] + z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop final(foobool(argc)), final(true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'final' clause}} @@ -51,6 +52,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp taskloop final // expected-error {{expected '(' after 'final'}} for (int i = 0; i < 10; ++i) foo(); @@ -66,7 +68,7 @@ int main(int argc, char **argv) { #pragma omp taskloop final(argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop final(argc > 0 ? argv[1] : argv[2]) +#pragma omp taskloop final(argc > 0 ? argv[1] : argv[2] - z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop final(foobool(argc)), final(true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'final' clause}} diff --git a/test/OpenMP/taskloop_firstprivate_messages.cpp b/test/OpenMP/taskloop_firstprivate_messages.cpp index fde767da94..9ef869f50a 100644 --- a/test/OpenMP/taskloop_firstprivate_messages.cpp +++ b/test/OpenMP/taskloop_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -76,7 +76,7 @@ template int foomain(int argc, char **argv) { I e(4); C g(5); - int i; + int i, z; int &j = i; #pragma omp parallel #pragma omp taskloop firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -119,7 +119,7 @@ int foomain(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel -#pragma omp taskloop firstprivate(e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}} +#pragma omp taskloop firstprivate(z, e, g) // expected-error {{calling a private constructor of class 'S4'}} expected-error {{calling a private constructor of class 'S5'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel diff --git a/test/OpenMP/taskloop_grainsize_messages.cpp b/test/OpenMP/taskloop_grainsize_messages.cpp index a1cfea474c..174d910d9f 100644 --- a/test/OpenMP/taskloop_grainsize_messages.cpp +++ b/test/OpenMP/taskloop_grainsize_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp taskloop grainsize // expected-error {{expected '(' after 'grainsize'}} for (int i = 0; i < 10; ++i) foo(); @@ -28,7 +29,7 @@ int tmain(T argc, S **argv) { #pragma omp taskloop grainsize (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp taskloop grainsize (argc > 0 ? argv[1][0] : argv[2][argc]) + #pragma omp taskloop grainsize (argc > 0 ? argv[1][0] : argv[2][argc] + z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop grainsize (foobool(argc)), grainsize (true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'grainsize' clause}} @@ -54,6 +55,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp taskloop grainsize // expected-error {{expected '(' after 'grainsize'}} for (int i = 0; i < 10; ++i) foo(); @@ -69,7 +71,7 @@ int main(int argc, char **argv) { #pragma omp taskloop grainsize (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp taskloop grainsize (argc > 0 ? argv[1][0] : argv[2][argc]) + #pragma omp taskloop grainsize (argc > 0 ? argv[1][0] : argv[2][argc] + z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop grainsize (foobool(argc)), grainsize (true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'grainsize' clause}} diff --git a/test/OpenMP/taskloop_in_reduction_messages.cpp b/test/OpenMP/taskloop_in_reduction_messages.cpp index 00c17d0a19..1441637ed2 100644 --- a/test/OpenMP/taskloop_in_reduction_messages.cpp +++ b/test/OpenMP/taskloop_in_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; diff --git a/test/OpenMP/taskloop_lastprivate_messages.cpp b/test/OpenMP/taskloop_lastprivate_messages.cpp index 929d2b801c..3d3aceea84 100644 --- a/test/OpenMP/taskloop_lastprivate_messages.cpp +++ b/test/OpenMP/taskloop_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -78,7 +78,7 @@ template int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp parallel #pragma omp taskloop lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -121,7 +121,7 @@ int foomain(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel -#pragma omp taskloop lastprivate(e, g) // expected-error 2 {{calling a private constructor of class 'S4'}} +#pragma omp taskloop lastprivate(z, e, g) // expected-error 2 {{calling a private constructor of class 'S4'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel @@ -172,7 +172,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp parallel #pragma omp taskloop lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -199,7 +199,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp taskloop lastprivate(argc) +#pragma omp taskloop lastprivate(argc, z) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel diff --git a/test/OpenMP/taskloop_loop_messages.cpp b/test/OpenMP/taskloop_loop_messages.cpp index 324114d6d7..d38e8d7096 100644 --- a/test/OpenMP/taskloop_loop_messages.cpp +++ b/test/OpenMP/taskloop_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized class S { int a; diff --git a/test/OpenMP/taskloop_misc_messages.c b/test/OpenMP/taskloop_misc_messages.c index 4e2ac0aab7..6ab4696fc7 100644 --- a/test/OpenMP/taskloop_misc_messages.c +++ b/test/OpenMP/taskloop_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp taskloop'}} #pragma omp taskloop diff --git a/test/OpenMP/taskloop_num_tasks_messages.cpp b/test/OpenMP/taskloop_num_tasks_messages.cpp index cf506ff5df..71812abc32 100644 --- a/test/OpenMP/taskloop_num_tasks_messages.cpp +++ b/test/OpenMP/taskloop_num_tasks_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp taskloop num_tasks // expected-error {{expected '(' after 'num_tasks'}} for (int i = 0; i < 10; ++i) foo(); @@ -28,7 +29,7 @@ int tmain(T argc, S **argv) { #pragma omp taskloop num_tasks (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp taskloop num_tasks (argc > 0 ? argv[1][0] : argv[2][argc]) + #pragma omp taskloop num_tasks (argc > 0 ? argv[1][0] : argv[2][argc] + z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop num_tasks (foobool(argc)), num_tasks (true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'num_tasks' clause}} @@ -54,6 +55,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp taskloop num_tasks // expected-error {{expected '(' after 'num_tasks'}} for (int i = 0; i < 10; ++i) foo(); @@ -69,7 +71,7 @@ int main(int argc, char **argv) { #pragma omp taskloop num_tasks (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp taskloop num_tasks (argc > 0 ? argv[1][0] : argv[2][argc]) + #pragma omp taskloop num_tasks (argc > 0 ? argv[1][0] : argv[2][argc] - z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop num_tasks (foobool(argc)), num_tasks (true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'num_tasks' clause}} diff --git a/test/OpenMP/taskloop_priority_messages.cpp b/test/OpenMP/taskloop_priority_messages.cpp index cbfd2579f5..2687708baa 100644 --- a/test/OpenMP/taskloop_priority_messages.cpp +++ b/test/OpenMP/taskloop_priority_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp taskloop priority // expected-error {{expected '(' after 'priority'}} for (int i = 0; i < 10; ++i) foo(); @@ -28,7 +29,7 @@ int tmain(T argc, S **argv) { #pragma omp taskloop priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp taskloop priority (argc > 0 ? argv[1][0] : argv[2][argc]) + #pragma omp taskloop priority (argc > 0 ? argv[1][0] : argv[2][argc] + z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop priority (foobool(argc)), priority (true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'priority' clause}} @@ -51,6 +52,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp taskloop priority // expected-error {{expected '(' after 'priority'}} for (int i = 0; i < 10; ++i) foo(); @@ -66,7 +68,7 @@ int main(int argc, char **argv) { #pragma omp taskloop priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp taskloop priority (argc > 0 ? argv[1][0] : argv[2][argc]) + #pragma omp taskloop priority (argc > 0 ? argv[1][0] : argv[2][argc] - z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop priority (foobool(argc)), priority (true) // expected-error {{directive '#pragma omp taskloop' cannot contain more than one 'priority' clause}} diff --git a/test/OpenMP/taskloop_private_messages.cpp b/test/OpenMP/taskloop_private_messages.cpp index 107a2f4b76..bc563ca112 100644 --- a/test/OpenMP/taskloop_private_messages.cpp +++ b/test/OpenMP/taskloop_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -106,7 +106,7 @@ template int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp taskloop private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) @@ -138,7 +138,7 @@ int foomain(I argc, C **argv) { #pragma omp taskloop private(argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp taskloop private(e, g) +#pragma omp taskloop private(e, g, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop private(h) // expected-error {{threadprivate or thread local variable cannot be private}} @@ -188,7 +188,7 @@ int main(int argc, char **argv) { S5 g(5); S6 s6(0.0) , s6_0(1.0); // expected-note {{in instantiation of member function 'S6::S6' requested here}} S7 > s7(0.0) , s7_0(1.0); - int i; + int i, z; int &j = i; #pragma omp taskloop private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) @@ -244,7 +244,7 @@ int main(int argc, char **argv) { #pragma omp taskloop private(j) for (int k = 0; k < argc; ++k) ++k; -#pragma omp taskloop private(i) +#pragma omp taskloop private(i, z) for (int k = 0; k < argc; ++k) ++k; static int si; diff --git a/test/OpenMP/taskloop_reduction_messages.cpp b/test/OpenMP/taskloop_reduction_messages.cpp index a1c533cfe0..b7a0f2eb0d 100644 --- a/test/OpenMP/taskloop_reduction_messages.cpp +++ b/test/OpenMP/taskloop_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -104,7 +104,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -149,7 +149,7 @@ T tmain(T argc) { #pragma omp taskloop reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp taskloop reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} @@ -226,7 +226,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -265,7 +265,7 @@ int main(int argc, char **argv) { #pragma omp taskloop reduction(~ : argc) // expected-error {{expected unqualified-id}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop reduction(&& : argc) +#pragma omp taskloop reduction(&& : argc, z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/taskloop_simd_aligned_messages.cpp b/test/OpenMP/taskloop_simd_aligned_messages.cpp index 24cdd00e6b..c7a62b8f4a 100644 --- a/test/OpenMP/taskloop_simd_aligned_messages.cpp +++ b/test/OpenMP/taskloop_simd_aligned_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct B { static int ib[20]; // expected-note 0 {{'B::ib' declared here}} diff --git a/test/OpenMP/taskloop_simd_collapse_messages.cpp b/test/OpenMP/taskloop_simd_collapse_messages.cpp index fd620c8fc1..7730990ac8 100644 --- a/test/OpenMP/taskloop_simd_collapse_messages.cpp +++ b/test/OpenMP/taskloop_simd_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/taskloop_simd_final_messages.cpp b/test/OpenMP/taskloop_simd_final_messages.cpp index b7393661c9..68360aa1a3 100644 --- a/test/OpenMP/taskloop_simd_final_messages.cpp +++ b/test/OpenMP/taskloop_simd_final_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp taskloop simd final // expected-error {{expected '(' after 'final'}} for (int i = 0; i < 10; ++i) foo(); @@ -25,7 +26,7 @@ int tmain(T argc, S **argv) { #pragma omp taskloop simd final(argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd final(argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} +#pragma omp taskloop simd final(argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd final(argc > 0 ? argv[1] : argv[2]) @@ -51,6 +52,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp taskloop simd final // expected-error {{expected '(' after 'final'}} for (int i = 0; i < 10; ++i) foo(); @@ -63,7 +65,7 @@ int main(int argc, char **argv) { #pragma omp taskloop simd final(argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd final(argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} +#pragma omp taskloop simd final(z+argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd final(argc > 0 ? argv[1] : argv[2]) diff --git a/test/OpenMP/taskloop_simd_firstprivate_messages.cpp b/test/OpenMP/taskloop_simd_firstprivate_messages.cpp index 7553bd2fec..1aea8c02a0 100644 --- a/test/OpenMP/taskloop_simd_firstprivate_messages.cpp +++ b/test/OpenMP/taskloop_simd_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -76,7 +76,7 @@ template int foomain(int argc, char **argv) { I e(4); C g(5); - int i; + int i, z; int &j = i; #pragma omp parallel #pragma omp taskloop simd firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -115,7 +115,7 @@ int foomain(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel -#pragma omp taskloop simd firstprivate(argv[1]) // expected-error {{expected variable name}} +#pragma omp taskloop simd firstprivate(z, argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel @@ -182,7 +182,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp parallel #pragma omp taskloop simd firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -209,7 +209,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp taskloop simd firstprivate(argc) +#pragma omp taskloop simd firstprivate(argc, z) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel diff --git a/test/OpenMP/taskloop_simd_grainsize_messages.cpp b/test/OpenMP/taskloop_simd_grainsize_messages.cpp index 3441e59e56..4c4bf39fe8 100644 --- a/test/OpenMP/taskloop_simd_grainsize_messages.cpp +++ b/test/OpenMP/taskloop_simd_grainsize_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp taskloop simd grainsize // expected-error {{expected '(' after 'grainsize'}} for (int i = 0; i < 10; ++i) foo(); @@ -25,7 +26,7 @@ int tmain(T argc, S **argv) { #pragma omp taskloop simd grainsize (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp taskloop simd grainsize (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} + #pragma omp taskloop simd grainsize (z + argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd grainsize (argc > 0 ? argv[1][0] : argv[2][argc]) @@ -54,6 +55,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp taskloop simd grainsize // expected-error {{expected '(' after 'grainsize'}} for (int i = 0; i < 10; ++i) foo(); @@ -66,7 +68,7 @@ int main(int argc, char **argv) { #pragma omp taskloop simd grainsize (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp taskloop simd grainsize (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} + #pragma omp taskloop simd grainsize (argc+z)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd grainsize (argc > 0 ? argv[1][0] : argv[2][argc]) diff --git a/test/OpenMP/taskloop_simd_in_reduction_messages.cpp b/test/OpenMP/taskloop_simd_in_reduction_messages.cpp index 6ad8bad2a3..7724369691 100644 --- a/test/OpenMP/taskloop_simd_in_reduction_messages.cpp +++ b/test/OpenMP/taskloop_simd_in_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -125,7 +125,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -163,8 +163,8 @@ T tmain(T argc) { #pragma omp taskloop simd in_reduction(& : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{invalid operands to binary expression ('float' and 'float')}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskgroup task_reduction(|:argc) // expected-error {{invalid operands to binary expression ('float' and 'float')}} -#pragma omp taskloop simd in_reduction(| : argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{invalid operands to binary expression ('float' and 'float')}} +#pragma omp taskgroup task_reduction(|:z) // expected-error {{invalid operands to binary expression ('float' and 'float')}} +#pragma omp taskloop simd in_reduction(| : z, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{invalid operands to binary expression ('float' and 'float')}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd in_reduction(|| : argc ? i : argc) // expected-error 2 {{expected variable name, array element or array section}} @@ -268,7 +268,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -308,8 +308,8 @@ int main(int argc, char **argv) { #pragma omp taskloop simd in_reduction(~ : argc) // expected-error {{expected unqualified-id}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskgroup task_reduction(&&:argc) -#pragma omp taskloop simd in_reduction(&& : argc) +#pragma omp taskgroup task_reduction(&&:argc, z) +#pragma omp taskloop simd in_reduction(&& : argc, z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd in_reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/taskloop_simd_lastprivate_messages.cpp b/test/OpenMP/taskloop_simd_lastprivate_messages.cpp index ec0d071a1d..70c508fdd0 100644 --- a/test/OpenMP/taskloop_simd_lastprivate_messages.cpp +++ b/test/OpenMP/taskloop_simd_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -78,7 +78,7 @@ template int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp parallel #pragma omp taskloop simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -113,7 +113,7 @@ int foomain(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel -#pragma omp taskloop simd lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} +#pragma omp taskloop simd lastprivate(z, a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp parallel @@ -172,7 +172,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp parallel #pragma omp taskloop simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -199,7 +199,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp parallel -#pragma omp taskloop simd lastprivate(argc) +#pragma omp taskloop simd lastprivate(argc, z) for (i = 0; i < argc; ++i) foo(); #pragma omp parallel diff --git a/test/OpenMP/taskloop_simd_linear_messages.cpp b/test/OpenMP/taskloop_simd_linear_messages.cpp index 05b08d6d75..0c1acf370a 100644 --- a/test/OpenMP/taskloop_simd_linear_messages.cpp +++ b/test/OpenMP/taskloop_simd_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -113,7 +113,7 @@ S3 h; template int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp taskloop simd linear // expected-error {{expected '(' after 'linear'}} for (int k = 0; k < argc; ++k) ++k; @@ -149,7 +149,7 @@ template int foomain(I argc, C **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop simd linear(ref(e, g)) // expected-error 2 {{variable of non-reference type 'int' can be used only with 'val' modifier, but used with 'ref'}} for (int k = 0; k < argc; ++k) ++k; - #pragma omp taskloop simd linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}} + #pragma omp taskloop simd linear(h, z) // expected-error {{threadprivate or thread local variable cannot be linear}} for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop simd linear(uval(i)) // expected-error {{variable of non-reference type 'int' can be used only with 'val' modifier, but used with 'uval'}} for (int k = 0; k < argc; ++k) ++k; @@ -204,7 +204,7 @@ int main(int argc, char **argv) { S4 e(4); // expected-note {{'e' defined here}} S5 g(5); // expected-note {{'g' defined here}} - int i; + int i, z; int &j = i; #pragma omp taskloop simd linear(f) linear(f) // expected-error {{linear variable cannot be linear}} expected-note {{defined as linear}} for (int k = 0; k < argc; ++k) ++k; @@ -226,7 +226,7 @@ int main(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop simd linear (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; - #pragma omp taskloop simd linear (argc) + #pragma omp taskloop simd linear (argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop simd linear (S1) // expected-error {{'S1' does not refer to a value}} for (int k = 0; k < argc; ++k) ++k; diff --git a/test/OpenMP/taskloop_simd_loop_messages.cpp b/test/OpenMP/taskloop_simd_loop_messages.cpp index fcae0130d9..666dba5200 100644 --- a/test/OpenMP/taskloop_simd_loop_messages.cpp +++ b/test/OpenMP/taskloop_simd_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized class S { int a; diff --git a/test/OpenMP/taskloop_simd_misc_messages.c b/test/OpenMP/taskloop_simd_misc_messages.c index bb4b2dfbb8..2b6bbe9f37 100644 --- a/test/OpenMP/taskloop_simd_misc_messages.c +++ b/test/OpenMP/taskloop_simd_misc_messages.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp taskloop simd'}} #pragma omp taskloop simd diff --git a/test/OpenMP/taskloop_simd_num_tasks_messages.cpp b/test/OpenMP/taskloop_simd_num_tasks_messages.cpp index 3267d294b7..0b30d0935b 100644 --- a/test/OpenMP/taskloop_simd_num_tasks_messages.cpp +++ b/test/OpenMP/taskloop_simd_num_tasks_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp taskloop simd num_tasks // expected-error {{expected '(' after 'num_tasks'}} for (int i = 0; i < 10; ++i) foo(); @@ -28,7 +29,7 @@ int tmain(T argc, S **argv) { #pragma omp taskloop simd num_tasks (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp taskloop simd num_tasks (argc > 0 ? argv[1][0] : argv[2][argc]) + #pragma omp taskloop simd num_tasks (argc > 0 ? argv[1][0] : argv[2][argc] + z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd num_tasks (foobool(argc)), num_tasks (true) // expected-error {{directive '#pragma omp taskloop simd' cannot contain more than one 'num_tasks' clause}} @@ -54,6 +55,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp taskloop simd num_tasks // expected-error {{expected '(' after 'num_tasks'}} for (int i = 0; i < 10; ++i) foo(); @@ -69,7 +71,7 @@ int main(int argc, char **argv) { #pragma omp taskloop simd num_tasks (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp taskloop simd num_tasks (argc > 0 ? argv[1][0] : argv[2][argc]) + #pragma omp taskloop simd num_tasks (argc > 0 ? argv[1][0] : argv[2][argc] - z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd num_tasks (foobool(argc)), num_tasks (true) // expected-error {{directive '#pragma omp taskloop simd' cannot contain more than one 'num_tasks' clause}} diff --git a/test/OpenMP/taskloop_simd_priority_messages.cpp b/test/OpenMP/taskloop_simd_priority_messages.cpp index 44e0b57a00..f51cff4137 100644 --- a/test/OpenMP/taskloop_simd_priority_messages.cpp +++ b/test/OpenMP/taskloop_simd_priority_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { + T z; #pragma omp taskloop simd priority // expected-error {{expected '(' after 'priority'}} for (int i = 0; i < 10; ++i) foo(); @@ -25,7 +26,7 @@ int tmain(T argc, S **argv) { #pragma omp taskloop simd priority (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp taskloop simd priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} + #pragma omp taskloop simd priority (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd priority (argc > 0 ? argv[1][0] : argv[2][argc]) @@ -51,6 +52,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { + int z; #pragma omp taskloop simd priority // expected-error {{expected '(' after 'priority'}} for (int i = 0; i < 10; ++i) foo(); @@ -63,7 +65,7 @@ int main(int argc, char **argv) { #pragma omp taskloop simd priority (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (int i = 0; i < 10; ++i) foo(); - #pragma omp taskloop simd priority (argc)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} + #pragma omp taskloop simd priority (argc + z)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd priority (argc > 0 ? argv[1][0] : argv[2][argc]) diff --git a/test/OpenMP/taskloop_simd_private_messages.cpp b/test/OpenMP/taskloop_simd_private_messages.cpp index 4198c891c2..c7b7ba0542 100644 --- a/test/OpenMP/taskloop_simd_private_messages.cpp +++ b/test/OpenMP/taskloop_simd_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -106,7 +106,7 @@ template int foomain(I argc, C **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp taskloop simd private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) @@ -138,7 +138,7 @@ int foomain(I argc, C **argv) { #pragma omp taskloop simd private(argv[1]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp taskloop simd private(e, g) +#pragma omp taskloop simd private(e, g, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop simd private(h) // expected-error {{threadprivate or thread local variable cannot be private}} @@ -188,7 +188,7 @@ int main(int argc, char **argv) { S5 g(5); S6 s6(0.0) , s6_0(1.0); // expected-note {{in instantiation of member function 'S6::S6' requested here}} S7 > s7(0.0) , s7_0(1.0); - int i; + int i, z; int &j = i; #pragma omp taskloop simd private // expected-error {{expected '(' after 'private'}} for (int k = 0; k < argc; ++k) @@ -208,7 +208,7 @@ int main(int argc, char **argv) { #pragma omp taskloop simd private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}} for (int k = 0; k < argc; ++k) ++k; -#pragma omp taskloop simd private(argc) +#pragma omp taskloop simd private(argc, z) for (int k = 0; k < argc; ++k) ++k; #pragma omp taskloop simd private(S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/taskloop_simd_reduction_messages.cpp b/test/OpenMP/taskloop_simd_reduction_messages.cpp index dc3a389fc0..7ac4c2488c 100644 --- a/test/OpenMP/taskloop_simd_reduction_messages.cpp +++ b/test/OpenMP/taskloop_simd_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -ferror-limit 150 -o - %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 150 -o - %s -Wuninitialized typedef void **omp_allocator_handle_t; extern const omp_allocator_handle_t omp_default_mem_alloc; @@ -104,7 +104,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -161,7 +161,7 @@ T tmain(T argc) { #pragma omp taskloop simd reduction(+ : ba) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd reduction(* : ca) // expected-error {{const-qualified variable cannot be reduction}} +#pragma omp taskloop simd reduction(* : z, ca) // expected-error {{const-qualified variable cannot be reduction}} for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} expected-error {{const-qualified variable cannot be reduction}} @@ -226,7 +226,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -265,7 +265,7 @@ int main(int argc, char **argv) { #pragma omp taskloop simd reduction(~ : argc) // expected-error {{expected unqualified-id}} for (int i = 0; i < 10; ++i) foo(); -#pragma omp taskloop simd reduction(&& : argc) +#pragma omp taskloop simd reduction(&& : argc, z) for (int i = 0; i < 10; ++i) foo(); #pragma omp taskloop simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/taskloop_simd_safelen_messages.cpp b/test/OpenMP/taskloop_simd_safelen_messages.cpp index b926689c3b..8af6dd02cc 100644 --- a/test/OpenMP/taskloop_simd_safelen_messages.cpp +++ b/test/OpenMP/taskloop_simd_safelen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/taskloop_simd_simdlen_messages.cpp b/test/OpenMP/taskloop_simd_simdlen_messages.cpp index 75d9a1d360..59e4b8b8f0 100644 --- a/test/OpenMP/taskloop_simd_simdlen_messages.cpp +++ b/test/OpenMP/taskloop_simd_simdlen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } @@ -29,7 +29,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}} // expected-error@+3 {{expected ')'}} expected-note@+3 {{to match this '('}} // expected-error@+2 2 {{expression is not an integral constant expression}} // expected-note@+1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} - #pragma omp taskloop simd simdlen (argc + #pragma omp taskloop simd simdlen (argc for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+1 {{argument to 'simdlen' clause must be a strictly positive integer value}} #pragma omp taskloop simd simdlen (ST // expected-error {{expected ')'}} expected-note {{to match this '('}} diff --git a/test/OpenMP/taskwait_messages.cpp b/test/OpenMP/taskwait_messages.cpp index ed7c53b070..793fb978b5 100644 --- a/test/OpenMP/taskwait_messages.cpp +++ b/test/OpenMP/taskwait_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized template T tmain(T argc) { diff --git a/test/OpenMP/taskyield_messages.cpp b/test/OpenMP/taskyield_messages.cpp index cb66ccddf3..d86f1b750c 100644 --- a/test/OpenMP/taskyield_messages.cpp +++ b/test/OpenMP/taskyield_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized template T tmain(T argc) { diff --git a/test/OpenMP/teams_default_messages.cpp b/test/OpenMP/teams_default_messages.cpp index 28a5e2902c..a025050406 100644 --- a/test/OpenMP/teams_default_messages.cpp +++ b/test/OpenMP/teams_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -o - %s +// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wuninitialized void foo(); diff --git a/test/OpenMP/teams_distribute_collapse_messages.cpp b/test/OpenMP/teams_distribute_collapse_messages.cpp index d95109c3dc..35a2d17085 100644 --- a/test/OpenMP/teams_distribute_collapse_messages.cpp +++ b/test/OpenMP/teams_distribute_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 -Wuninitialized void foo() { } diff --git a/test/OpenMP/teams_distribute_default_messages.cpp b/test/OpenMP/teams_distribute_default_messages.cpp index 9ebce9aea0..7f00020830 100644 --- a/test/OpenMP/teams_distribute_default_messages.cpp +++ b/test/OpenMP/teams_distribute_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo(); diff --git a/test/OpenMP/teams_distribute_dist_schedule_messages.cpp b/test/OpenMP/teams_distribute_dist_schedule_messages.cpp index a86a87a9ef..22d2408d3f 100644 --- a/test/OpenMP/teams_distribute_dist_schedule_messages.cpp +++ b/test/OpenMP/teams_distribute_dist_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -16,7 +16,7 @@ T tmain(T argc) { T b = argc, c, d, e, f, g; char ** argv; static T a; -// CHECK: static T a; + T z; #pragma omp target #pragma omp teams distribute dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} @@ -47,7 +47,7 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp target -#pragma omp teams distribute dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute' cannot contain more than one 'dist_schedule' clause}} +#pragma omp teams distribute dist_schedule (static), dist_schedule (static, 1< // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target #pragma omp teams distribute num_teams(C) for (int i=0; i<100; i++) foo(); @@ -39,7 +40,7 @@ T tmain(T argc) { #pragma omp teams distribute num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i=0; i<100; i++) foo(); #pragma omp target -#pragma omp teams distribute num_teams(argc + argc) +#pragma omp teams distribute num_teams(argc + argc + z) for (int i=0; i<100; i++) foo(); #pragma omp target #pragma omp teams distribute num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp teams distribute' cannot contain more than one 'num_teams' clause}} @@ -61,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams distribute num_teams // expected-error {{expected '(' after 'num_teams'}} for (int i=0; i<100; i++) foo(); @@ -86,7 +88,7 @@ int main(int argc, char **argv) { for (int i=0; i<100; i++) foo(); #pragma omp target -#pragma omp teams distribute num_teams (argc + argc) +#pragma omp teams distribute num_teams (argc + argc + z) for (int i=0; i<100; i++) foo(); #pragma omp target diff --git a/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp index 1171807fdb..0c8a2e6108 100644 --- a/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 -Wuninitialized void foo() { } diff --git a/test/OpenMP/teams_distribute_parallel_for_copyin_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_copyin_messages.cpp index 2664b9df95..1c18f85590 100644 --- a/test/OpenMP/teams_distribute_parallel_for_copyin_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_copyin_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/teams_distribute_parallel_for_default_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_default_messages.cpp index efc139d84a..2c46623985 100644 --- a/test/OpenMP/teams_distribute_parallel_for_default_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo(); diff --git a/test/OpenMP/teams_distribute_parallel_for_dist_schedule_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_dist_schedule_messages.cpp index e0abe1114f..27ff4125da 100644 --- a/test/OpenMP/teams_distribute_parallel_for_dist_schedule_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_dist_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -16,7 +16,7 @@ T tmain(T argc) { T b = argc, c, d, e, f, g; char ** argv; static T a; -// CHECK: static T a; + T z; #pragma omp target #pragma omp teams distribute parallel for dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} @@ -47,7 +47,7 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}} +#pragma omp teams distribute parallel for dist_schedule (static), dist_schedule (static, 1+z) // expected-error {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -62,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams distribute parallel for dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); @@ -91,7 +92,7 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}} +#pragma omp teams distribute parallel for dist_schedule (static), dist_schedule (static, z+1) // expected-error {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target diff --git a/test/OpenMP/teams_distribute_parallel_for_firstprivate_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_firstprivate_messages.cpp index 922658e6dd..b6fac35b76 100644 --- a/test/OpenMP/teams_distribute_parallel_for_firstprivate_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -64,7 +64,7 @@ int main(int argc, char **argv) { S4 e(4); S5 g(5); S6 p; - int i; + int i, z; int &j = i; #pragma omp target @@ -116,7 +116,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for firstprivate(da) +#pragma omp teams distribute parallel for firstprivate(da, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/test/OpenMP/teams_distribute_parallel_for_if_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_if_messages.cpp index e92dc65c60..6f724b0501 100644 --- a/test/OpenMP/teams_distribute_parallel_for_if_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp target #pragma omp teams distribute parallel for if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); @@ -45,7 +45,7 @@ int tmain(T argc, S **argv) { #pragma omp teams distribute parallel for if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for if(argc) +#pragma omp teams distribute parallel for if(argc+z) for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams distribute parallel for if(parallel // expected-error {{use of undeclared identifier 'parallel'}} expected-error {{expected ')'}} expected-note {{to match this '('}} @@ -76,7 +76,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target #pragma omp teams distribute parallel for if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); @@ -123,7 +123,7 @@ int main(int argc, char **argv) { #pragma omp teams distribute parallel for if(parallel : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for if(parallel : argc) +#pragma omp teams distribute parallel for if(parallel : argc + z) for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams distribute parallel for if(parallel : argc) if (for:argc) // expected-error {{directive name modifier 'for' is not allowed for '#pragma omp teams distribute parallel for'}} diff --git a/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp index 22d8e6ad71..56f4bc0260 100644 --- a/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/test/OpenMP/teams_distribute_parallel_for_loop_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_loop_messages.cpp index 42dc92e3ce..2e1be8f9f6 100644 --- a/test/OpenMP/teams_distribute_parallel_for_loop_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized class S { int a; diff --git a/test/OpenMP/teams_distribute_parallel_for_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_messages.cpp index b861783842..906c330428 100644 --- a/test/OpenMP/teams_distribute_parallel_for_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/teams_distribute_parallel_for_num_teams_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_num_teams_messages.cpp index cc6f1c8e64..2f34c8b60f 100644 --- a/test/OpenMP/teams_distribute_parallel_for_num_teams_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_num_teams_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target #pragma omp teams distribute parallel for num_teams(C) for (int i=0; i<100; i++) foo(); @@ -39,7 +40,7 @@ T tmain(T argc) { #pragma omp teams distribute parallel for num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i=0; i<100; i++) foo(); #pragma omp target -#pragma omp teams distribute parallel for num_teams(argc + argc) +#pragma omp teams distribute parallel for num_teams(argc + argc + z) for (int i=0; i<100; i++) foo(); #pragma omp target #pragma omp teams distribute parallel for num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'num_teams' clause}} @@ -61,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams distribute parallel for num_teams // expected-error {{expected '(' after 'num_teams'}} for (int i=0; i<100; i++) foo(); @@ -86,7 +88,7 @@ int main(int argc, char **argv) { for (int i=0; i<100; i++) foo(); #pragma omp target -#pragma omp teams distribute parallel for num_teams (argc + argc) +#pragma omp teams distribute parallel for num_teams (argc + argc - z) for (int i=0; i<100; i++) foo(); #pragma omp target diff --git a/test/OpenMP/teams_distribute_parallel_for_private_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_private_messages.cpp index 5b22861f8e..9b24c3099c 100644 --- a/test/OpenMP/teams_distribute_parallel_for_private_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/test/OpenMP/teams_distribute_parallel_for_proc_bind_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_proc_bind_messages.cpp index 33e9c39be9..56d5c45e89 100644 --- a/test/OpenMP/teams_distribute_parallel_for_proc_bind_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_proc_bind_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo(); diff --git a/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp index cc7a4c668b..beebe84e6d 100644 --- a/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -80,7 +80,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -126,7 +126,7 @@ T tmain(T argc) { #pragma omp teams distribute parallel for reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp teams distribute parallel for reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute parallel for reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} @@ -197,7 +197,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -261,7 +261,7 @@ int main(int argc, char **argv) { #pragma omp teams distribute parallel for reduction(- : da) // expected-error {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for reduction(^ : fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} +#pragma omp teams distribute parallel for reduction(^ : z, fl) // expected-error {{invalid operands to binary expression ('float' and 'float')}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute parallel for reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}} diff --git a/test/OpenMP/teams_distribute_parallel_for_schedule_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_schedule_messages.cpp index e8cda672c0..8c8fa77ea0 100644 --- a/test/OpenMP/teams_distribute_parallel_for_schedule_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -13,6 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} T tmain(T argc, S **argv) { + T k; // expected-error@+2 {{expected '(' after 'schedule'}} #pragma omp target #pragma omp teams distribute parallel for schedule @@ -85,7 +86,7 @@ T tmain(T argc, S **argv) { for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; #pragma omp target -#pragma omp teams distribute parallel for schedule (dynamic, 1) +#pragma omp teams distribute parallel for schedule (dynamic, k) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+2 {{argument to 'schedule' clause must be a strictly positive integer value}} diff --git a/test/OpenMP/teams_distribute_parallel_for_shared_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_shared_messages.cpp index 90edfb1b11..faa2b200e6 100644 --- a/test/OpenMP/teams_distribute_parallel_for_shared_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized void foo() { } diff --git a/test/OpenMP/teams_distribute_parallel_for_simd_aligned_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_simd_aligned_messages.cpp index a8f14cb61f..206540af6e 100644 --- a/test/OpenMP/teams_distribute_parallel_for_simd_aligned_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_simd_aligned_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct B { static int ib[20]; // expected-note 0 {{'B::ib' declared here}} diff --git a/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp index 31611c7ff0..032ab9c449 100644 --- a/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp %s -std=c++98 -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp %s -std=c++11 -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 -Wuninitialized void foo() { } diff --git a/test/OpenMP/teams_distribute_parallel_for_simd_default_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_simd_default_messages.cpp index 4de844737a..93017a8233 100644 --- a/test/OpenMP/teams_distribute_parallel_for_simd_default_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_simd_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo(); diff --git a/test/OpenMP/teams_distribute_parallel_for_simd_dist_schedule_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_simd_dist_schedule_messages.cpp index d53fa578b5..cbd4ec4ce9 100644 --- a/test/OpenMP/teams_distribute_parallel_for_simd_dist_schedule_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_simd_dist_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -16,7 +16,7 @@ T tmain(T argc) { T b = argc, c, d, e, f, g; char ** argv; static T a; -// CHECK: static T a; + T z; #pragma omp target #pragma omp teams distribute parallel for simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} @@ -47,7 +47,7 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}} +#pragma omp teams distribute parallel for simd dist_schedule (static), dist_schedule (static, 1*z) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -62,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams distribute parallel for simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); @@ -91,7 +92,7 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}} +#pragma omp teams distribute parallel for simd dist_schedule (static), dist_schedule (static, z>>1) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target diff --git a/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_messages.cpp index 182c21423a..87098ca45a 100644 --- a/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_simd_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -64,7 +64,7 @@ int main(int argc, char **argv) { S4 e(4); S5 g(5); S6 p; - int i; + int i, z; int &j = i; #pragma omp target @@ -108,7 +108,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd firstprivate(ba) +#pragma omp teams distribute parallel for simd firstprivate(ba, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/test/OpenMP/teams_distribute_parallel_for_simd_if_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_simd_if_messages.cpp index d8a642300d..c01e6e87e3 100644 --- a/test/OpenMP/teams_distribute_parallel_for_simd_if_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_simd_if_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -fopenmp-version=45 -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} int tmain(T argc, S **argv) { - T i; + T i, z; #pragma omp target #pragma omp teams distribute parallel for simd if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); @@ -33,7 +33,7 @@ int tmain(T argc, S **argv) { #pragma omp teams distribute parallel for simd if (argc > 0 ? argv[1] : argv[2]) for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'if' clause}} +#pragma omp teams distribute parallel for simd if (foobool(argc)*z), if (true) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'if' clause}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams distribute parallel for simd if (S) // expected-error {{'S' does not refer to a value}} @@ -76,7 +76,7 @@ int tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, z; #pragma omp target #pragma omp teams distribute parallel for simd if // expected-error {{expected '(' after 'if'}} for (i = 0; i < argc; ++i) foo(); @@ -90,7 +90,7 @@ int main(int argc, char **argv) { #pragma omp teams distribute parallel for simd if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp teams distribute parallel for simd' are ignored}} +#pragma omp teams distribute parallel for simd if (argc/z)) // expected-warning {{extra tokens at the end of '#pragma omp teams distribute parallel for simd' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams distribute parallel for simd if (argc > 0 ? argv[1] : argv[2]) diff --git a/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp index d0f6775c57..fe70da5b41 100644 --- a/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_simd_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -69,7 +69,7 @@ template int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, z; int &j = i; #pragma omp target #pragma omp teams distribute parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -104,7 +104,7 @@ int foomain(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp target -#pragma omp teams distribute parallel for simd lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} +#pragma omp teams distribute parallel for simd lastprivate(z, a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target @@ -159,7 +159,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, z; int &j = i; #pragma omp target #pragma omp teams distribute parallel for simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -186,7 +186,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(argc) +#pragma omp teams distribute parallel for simd lastprivate(argc, z) for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp index 44e42c624d..f79a9986d2 100644 --- a/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_simd_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; namespace X { diff --git a/test/OpenMP/teams_distribute_parallel_for_simd_loop_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_simd_loop_messages.cpp index a1c9280736..2fae965da8 100644 --- a/test/OpenMP/teams_distribute_parallel_for_simd_loop_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_simd_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized class S { int a; diff --git a/test/OpenMP/teams_distribute_parallel_for_simd_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_simd_messages.cpp index e95ddfc669..c07cef1861 100644 --- a/test/OpenMP/teams_distribute_parallel_for_simd_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_simd_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/teams_distribute_parallel_for_simd_num_teams_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_simd_num_teams_messages.cpp index 5e4ce0c864..c18890ff90 100644 --- a/test/OpenMP/teams_distribute_parallel_for_simd_num_teams_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_simd_num_teams_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template // expected-note {{declared here}} T tmain(T argc) { char **a; + T k; #pragma omp target #pragma omp teams distribute parallel for simd num_teams(C) for (int i=0; i<100; i++) foo(); @@ -39,7 +40,7 @@ T tmain(T argc) { #pragma omp teams distribute parallel for simd num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int i=0; i<100; i++) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd num_teams(argc + argc) +#pragma omp teams distribute parallel for simd num_teams(argc + k) for (int i=0; i<100; i++) foo(); #pragma omp target #pragma omp teams distribute parallel for simd num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'num_teams' clause}} @@ -61,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int k; #pragma omp target #pragma omp teams distribute parallel for simd num_teams // expected-error {{expected '(' after 'num_teams'}} for (int i=0; i<100; i++) foo(); @@ -86,7 +88,7 @@ int main(int argc, char **argv) { for (int i=0; i<100; i++) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd num_teams (argc + argc) +#pragma omp teams distribute parallel for simd num_teams (argc + k) for (int i=0; i<100; i++) foo(); #pragma omp target diff --git a/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_messages.cpp index 1f9b61e464..6ff5db319a 100644 --- a/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_simd_num_threads_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s -Wuninitialized void foo() { } @@ -13,7 +13,7 @@ struct S1; // expected-note {{declared here}} template // expected-note {{declared here}} T tmain(T argc, S **argv) { - T i; + T i, k; #pragma omp target #pragma omp teams distribute parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); @@ -27,7 +27,7 @@ T tmain(T argc, S **argv) { #pragma omp teams distribute parallel for simd num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp teams distribute parallel for simd' are ignored}} +#pragma omp teams distribute parallel for simd num_threads (k)) // expected-warning {{extra tokens at the end of '#pragma omp teams distribute parallel for simd' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams distribute parallel for simd num_threads ((argc > 0) ? argv[1] : argv[2]) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}} @@ -52,7 +52,7 @@ T tmain(T argc, S **argv) { } int main(int argc, char **argv) { - int i; + int i, k; #pragma omp target #pragma omp teams distribute parallel for simd num_threads // expected-error {{expected '(' after 'num_threads'}} for (i = 0; i < argc; ++i) foo(); @@ -66,7 +66,7 @@ int main(int argc, char **argv) { #pragma omp teams distribute parallel for simd num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}} for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp teams distribute parallel for simd' are ignored}} +#pragma omp teams distribute parallel for simd num_threads (k)) // expected-warning {{extra tokens at the end of '#pragma omp teams distribute parallel for simd' are ignored}} for (i = 0; i < argc; ++i) foo(); #pragma omp target #pragma omp teams distribute parallel for simd num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }} diff --git a/test/OpenMP/teams_distribute_parallel_for_simd_private_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_simd_private_messages.cpp index 9d4ca03f9e..689d6c8151 100644 --- a/test/OpenMP/teams_distribute_parallel_for_simd_private_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_simd_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -34,7 +34,7 @@ class S4 { public: S4(int v):a(v) { } }; -class S5 { +class S5 { int a; S5():a(0) {} // expected-note {{implicitly declared private here}} public: diff --git a/test/OpenMP/teams_distribute_parallel_for_simd_proc_bind_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_simd_proc_bind_messages.cpp index 459f40f494..c61c0984b5 100644 --- a/test/OpenMP/teams_distribute_parallel_for_simd_proc_bind_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_simd_proc_bind_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 -o - %s -Wuninitialized void foo(); diff --git a/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp index 82854a7cb6..feb31286b8 100644 --- a/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_simd_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -80,7 +80,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -126,7 +126,7 @@ T tmain(T argc) { #pragma omp teams distribute parallel for simd reduction(^ : T) // expected-error {{'T' does not refer to a value}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp teams distribute parallel for simd reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute parallel for simd reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} @@ -197,7 +197,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -237,7 +237,7 @@ int main(int argc, char **argv) { #pragma omp teams distribute parallel for simd reduction(~ : argc) // expected-error {{expected unqualified-id}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd reduction(&& : argc) +#pragma omp teams distribute parallel for simd reduction(&& : argc, z) for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute parallel for simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/teams_distribute_parallel_for_simd_safelen_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_simd_safelen_messages.cpp index 2b31c89634..3e455d2934 100644 --- a/test/OpenMP/teams_distribute_parallel_for_simd_safelen_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_simd_safelen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/teams_distribute_parallel_for_simd_shared_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_simd_shared_messages.cpp index 90f3cf46b9..2eefa1ee19 100644 --- a/test/OpenMP/teams_distribute_parallel_for_simd_shared_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_simd_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized void foo() { } diff --git a/test/OpenMP/teams_distribute_parallel_for_simd_simdlen_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_simd_simdlen_messages.cpp index 2b31c89634..3e455d2934 100644 --- a/test/OpenMP/teams_distribute_parallel_for_simd_simdlen_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_simd_simdlen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/teams_distribute_parallel_for_simd_thread_limit_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_simd_thread_limit_messages.cpp index b5a95760eb..6d0cfaa780 100644 --- a/test/OpenMP/teams_distribute_parallel_for_simd_thread_limit_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_simd_thread_limit_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target #pragma omp teams distribute parallel for simd thread_limit(C) for (int j=0; j<100; j++) foo(); @@ -39,7 +40,7 @@ T tmain(T argc) { #pragma omp teams distribute parallel for simd thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd thread_limit(argc + argc) +#pragma omp teams distribute parallel for simd thread_limit(argc + z) for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute parallel for simd thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'thread_limit' clause}} @@ -61,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams distribute parallel for simd thread_limit // expected-error {{expected '(' after 'thread_limit'}} for (int j=0; j<100; j++) foo(); @@ -86,7 +88,7 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for simd thread_limit (argc + argc) +#pragma omp teams distribute parallel for simd thread_limit (argc + z) for (int j=0; j<100; j++) foo(); #pragma omp target diff --git a/test/OpenMP/teams_distribute_parallel_for_thread_limit_messages.cpp b/test/OpenMP/teams_distribute_parallel_for_thread_limit_messages.cpp index ad37b5389c..85aa33a7b6 100644 --- a/test/OpenMP/teams_distribute_parallel_for_thread_limit_messages.cpp +++ b/test/OpenMP/teams_distribute_parallel_for_thread_limit_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target #pragma omp teams distribute parallel for thread_limit(C) for (int j=0; j<100; j++) foo(); @@ -39,7 +40,7 @@ T tmain(T argc) { #pragma omp teams distribute parallel for thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for thread_limit(argc + argc) +#pragma omp teams distribute parallel for thread_limit(argc + argc + z) for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute parallel for thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'thread_limit' clause}} @@ -61,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams distribute parallel for thread_limit // expected-error {{expected '(' after 'thread_limit'}} for (int j=0; j<100; j++) foo(); @@ -86,7 +88,7 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute parallel for thread_limit (argc + argc) +#pragma omp teams distribute parallel for thread_limit (argc + argc + z) for (int j=0; j<100; j++) foo(); #pragma omp target diff --git a/test/OpenMP/teams_distribute_private_messages.cpp b/test/OpenMP/teams_distribute_private_messages.cpp index 130cbd5c57..8654bbf3b6 100644 --- a/test/OpenMP/teams_distribute_private_messages.cpp +++ b/test/OpenMP/teams_distribute_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/test/OpenMP/teams_distribute_reduction_messages.cpp b/test/OpenMP/teams_distribute_reduction_messages.cpp index 6b209c7797..9e1ed32fc3 100644 --- a/test/OpenMP/teams_distribute_reduction_messages.cpp +++ b/test/OpenMP/teams_distribute_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -86,7 +86,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -135,7 +135,7 @@ T tmain(T argc) { #pragma omp teams distribute reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} +#pragma omp teams distribute reduction(min : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute reduction(max : h.b) // expected-error {{expected variable name, array element or array section}} @@ -203,7 +203,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -303,7 +303,7 @@ int main(int argc, char **argv) { #pragma omp teams distribute reduction(max : j) // expected-error {{argument of OpenMP clause 'reduction' must reference the same object in all threads}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute reduction(+ : fl) +#pragma omp teams distribute reduction(+ : fl, z) for (int j=0; j<100; j++) foo(); static int m; #pragma omp target diff --git a/test/OpenMP/teams_distribute_shared_messages.cpp b/test/OpenMP/teams_distribute_shared_messages.cpp index b1828eb43c..452d017b5d 100644 --- a/test/OpenMP/teams_distribute_shared_messages.cpp +++ b/test/OpenMP/teams_distribute_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized void foo() { } diff --git a/test/OpenMP/teams_distribute_simd_aligned_messages.cpp b/test/OpenMP/teams_distribute_simd_aligned_messages.cpp index f745aaad7f..955a2b5a82 100644 --- a/test/OpenMP/teams_distribute_simd_aligned_messages.cpp +++ b/test/OpenMP/teams_distribute_simd_aligned_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp-simd %s -Wuninitialized struct B { static int ib[20]; // expected-note 0 {{'B::ib' declared here}} diff --git a/test/OpenMP/teams_distribute_simd_collapse_messages.cpp b/test/OpenMP/teams_distribute_simd_collapse_messages.cpp index a5eb6d20e0..75c7c61902 100644 --- a/test/OpenMP/teams_distribute_simd_collapse_messages.cpp +++ b/test/OpenMP/teams_distribute_simd_collapse_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/teams_distribute_simd_default_messages.cpp b/test/OpenMP/teams_distribute_simd_default_messages.cpp index 8f6db01efb..2775210ae0 100644 --- a/test/OpenMP/teams_distribute_simd_default_messages.cpp +++ b/test/OpenMP/teams_distribute_simd_default_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo(); diff --git a/test/OpenMP/teams_distribute_simd_dist_schedule_messages.cpp b/test/OpenMP/teams_distribute_simd_dist_schedule_messages.cpp index 3eb0db923b..4247975768 100644 --- a/test/OpenMP/teams_distribute_simd_dist_schedule_messages.cpp +++ b/test/OpenMP/teams_distribute_simd_dist_schedule_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized void foo() { } @@ -16,7 +16,7 @@ T tmain(T argc) { T b = argc, c, d, e, f, g; char ** argv; static T a; -// CHECK: static T a; + T z; #pragma omp target #pragma omp teams distribute simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} @@ -47,7 +47,7 @@ T tmain(T argc) { for (int i = 0; i < 10; ++i) foo(); #pragma omp target -#pragma omp teams distribute simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'dist_schedule' clause}} +#pragma omp teams distribute simd dist_schedule (static), dist_schedule (static, z) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target @@ -62,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams distribute simd dist_schedule // expected-error {{expected '(' after 'dist_schedule'}} for (int i = 0; i < 10; ++i) foo(); @@ -91,7 +92,7 @@ int main(int argc, char **argv) { for (int i = 0; i < 10; ++i) foo(); #pragma omp target -#pragma omp teams distribute simd dist_schedule (static), dist_schedule (static, 1) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'dist_schedule' clause}} +#pragma omp teams distribute simd dist_schedule (static), dist_schedule (static, 1 + z) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'dist_schedule' clause}} for (int i = 0; i < 10; ++i) foo(); #pragma omp target diff --git a/test/OpenMP/teams_distribute_simd_firstprivate_messages.cpp b/test/OpenMP/teams_distribute_simd_firstprivate_messages.cpp index 8ea499f2f8..f9818964ae 100644 --- a/test/OpenMP/teams_distribute_simd_firstprivate_messages.cpp +++ b/test/OpenMP/teams_distribute_simd_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -64,7 +64,7 @@ int main(int argc, char **argv) { S4 e(4); S5 g(5); S6 p; - int i; + int i, k; int &j = i; #pragma omp target @@ -100,7 +100,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute simd firstprivate (a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-error {{incomplete type 'S1' where a complete type is required}} +#pragma omp teams distribute simd firstprivate (k, a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}} expected-error {{incomplete type 'S1' where a complete type is required}} for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp b/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp index 3a7f0d2f4c..bad64fac08 100644 --- a/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp +++ b/test/OpenMP/teams_distribute_simd_lastprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -69,7 +69,7 @@ template int foomain(int argc, char **argv) { I e(4); I g(5); - int i; + int i, k; int &j = i; #pragma omp target #pragma omp teams distribute simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -104,7 +104,7 @@ int foomain(int argc, char **argv) { for (int k = 0; k < argc; ++k) ++k; #pragma omp target -#pragma omp teams distribute simd lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} +#pragma omp teams distribute simd lastprivate(k, a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}} for (int k = 0; k < argc; ++k) ++k; #pragma omp target @@ -159,7 +159,7 @@ int main(int argc, char **argv) { S5 g(5); S3 m; S6 n(2); - int i; + int i, k; int &j = i; #pragma omp target #pragma omp teams distribute simd lastprivate // expected-error {{expected '(' after 'lastprivate'}} @@ -206,7 +206,7 @@ int main(int argc, char **argv) { for (i = 0; i < argc; ++i) foo(); #pragma omp target -#pragma omp teams distribute simd lastprivate(ba) +#pragma omp teams distribute simd lastprivate(ba, k) for (i = 0; i < argc; ++i) foo(); #pragma omp target diff --git a/test/OpenMP/teams_distribute_simd_linear_messages.cpp b/test/OpenMP/teams_distribute_simd_linear_messages.cpp index 91b358f5ce..601d4ddf25 100644 --- a/test/OpenMP/teams_distribute_simd_linear_messages.cpp +++ b/test/OpenMP/teams_distribute_simd_linear_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; namespace X { diff --git a/test/OpenMP/teams_distribute_simd_loop_messages.cpp b/test/OpenMP/teams_distribute_simd_loop_messages.cpp index 777f0812ce..c463560a46 100644 --- a/test/OpenMP/teams_distribute_simd_loop_messages.cpp +++ b/test/OpenMP/teams_distribute_simd_loop_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized -// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s +// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s -Wuninitialized class S { int a; diff --git a/test/OpenMP/teams_distribute_simd_messages.cpp b/test/OpenMP/teams_distribute_simd_messages.cpp index 7a99e3f352..faaf16a23d 100644 --- a/test/OpenMP/teams_distribute_simd_messages.cpp +++ b/test/OpenMP/teams_distribute_simd_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/teams_distribute_simd_num_teams_messages.cpp b/test/OpenMP/teams_distribute_simd_num_teams_messages.cpp index 86164642b8..25ef0f32dd 100644 --- a/test/OpenMP/teams_distribute_simd_num_teams_messages.cpp +++ b/test/OpenMP/teams_distribute_simd_num_teams_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target #pragma omp teams distribute simd num_teams(C) for (int i=0; i<100; i++) foo(); @@ -42,7 +43,7 @@ T tmain(T argc) { #pragma omp teams distribute simd num_teams(argc + argc) for (int i=0; i<100; i++) foo(); #pragma omp target -#pragma omp teams distribute simd num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'num_teams' clause}} +#pragma omp teams distribute simd num_teams(argc + z), num_teams (argc+1) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'num_teams' clause}} for (int i=0; i<100; i++) foo(); #pragma omp target #pragma omp teams distribute simd num_teams(S1) // expected-error {{'S1' does not refer to a value}} @@ -61,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams distribute simd num_teams // expected-error {{expected '(' after 'num_teams'}} for (int i=0; i<100; i++) foo(); @@ -86,7 +88,7 @@ int main(int argc, char **argv) { for (int i=0; i<100; i++) foo(); #pragma omp target -#pragma omp teams distribute simd num_teams (argc + argc) +#pragma omp teams distribute simd num_teams (argc + argc + z) for (int i=0; i<100; i++) foo(); #pragma omp target diff --git a/test/OpenMP/teams_distribute_simd_private_messages.cpp b/test/OpenMP/teams_distribute_simd_private_messages.cpp index 7ffdf86e3c..88a6848e43 100644 --- a/test/OpenMP/teams_distribute_simd_private_messages.cpp +++ b/test/OpenMP/teams_distribute_simd_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -34,7 +34,7 @@ class S4 { public: S4(int v):a(v) { } }; -class S5 { +class S5 { int a; S5():a(0) {} // expected-note {{implicitly declared private here}} public: diff --git a/test/OpenMP/teams_distribute_simd_reduction_messages.cpp b/test/OpenMP/teams_distribute_simd_reduction_messages.cpp index 826de05219..56935ed8ac 100644 --- a/test/OpenMP/teams_distribute_simd_reduction_messages.cpp +++ b/test/OpenMP/teams_distribute_simd_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -80,7 +80,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -156,7 +156,7 @@ T tmain(T argc) { #pragma omp teams distribute simd reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute simd reduction(+ : o) // expected-error 2 {{no viable overloaded '='}} +#pragma omp teams distribute simd reduction(+ : z, o) // expected-error 2 {{no viable overloaded '='}} for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute simd private(i), reduction(+ : j), reduction(+ : q) // expected-error 4 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}} @@ -197,7 +197,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -237,7 +237,7 @@ int main(int argc, char **argv) { #pragma omp teams distribute simd reduction(~ : argc) // expected-error {{expected unqualified-id}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute simd reduction(&& : argc) +#pragma omp teams distribute simd reduction(&& : argc, z) for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}} diff --git a/test/OpenMP/teams_distribute_simd_safelen_messages.cpp b/test/OpenMP/teams_distribute_simd_safelen_messages.cpp index a3ea61e1da..0a2ccf3da8 100644 --- a/test/OpenMP/teams_distribute_simd_safelen_messages.cpp +++ b/test/OpenMP/teams_distribute_simd_safelen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/teams_distribute_simd_shared_messages.cpp b/test/OpenMP/teams_distribute_simd_shared_messages.cpp index b29e2bb855..81f7e2a663 100644 --- a/test/OpenMP/teams_distribute_simd_shared_messages.cpp +++ b/test/OpenMP/teams_distribute_simd_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized void foo() { } @@ -59,7 +59,7 @@ int main(int argc, char **argv) { const int da[5] = { 0 }; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; #pragma omp target #pragma omp teams distribute simd shared // expected-error {{expected '(' after 'shared'}} @@ -101,7 +101,7 @@ int main(int argc, char **argv) { #pragma omp teams distribute simd shared(da) for (int j=0; j<100; j++) foo(); #pragma omp target - #pragma omp teams distribute simd shared(e, g) + #pragma omp teams distribute simd shared(e, g, z) for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute simd shared(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be shared}} diff --git a/test/OpenMP/teams_distribute_simd_simdlen_messages.cpp b/test/OpenMP/teams_distribute_simd_simdlen_messages.cpp index a3ea61e1da..0a2ccf3da8 100644 --- a/test/OpenMP/teams_distribute_simd_simdlen_messages.cpp +++ b/test/OpenMP/teams_distribute_simd_simdlen_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/teams_distribute_simd_thread_limit_messages.cpp b/test/OpenMP/teams_distribute_simd_thread_limit_messages.cpp index 732bb34473..e2b30ef2e8 100644 --- a/test/OpenMP/teams_distribute_simd_thread_limit_messages.cpp +++ b/test/OpenMP/teams_distribute_simd_thread_limit_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target #pragma omp teams distribute simd thread_limit(C) for (int j=0; j<100; j++) foo(); @@ -39,7 +40,7 @@ T tmain(T argc) { #pragma omp teams distribute simd thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute simd thread_limit(argc + argc) +#pragma omp teams distribute simd thread_limit(argc + argc + z) for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute simd thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp teams distribute simd' cannot contain more than one 'thread_limit' clause}} @@ -61,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams distribute simd thread_limit // expected-error {{expected '(' after 'thread_limit'}} for (int j=0; j<100; j++) foo(); @@ -86,7 +88,7 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute simd thread_limit (argc + argc) +#pragma omp teams distribute simd thread_limit (argc + argc + z) for (int j=0; j<100; j++) foo(); #pragma omp target diff --git a/test/OpenMP/teams_distribute_thread_limit_messages.cpp b/test/OpenMP/teams_distribute_thread_limit_messages.cpp index d22cc25b5b..14ccbc29d8 100644 --- a/test/OpenMP/teams_distribute_thread_limit_messages.cpp +++ b/test/OpenMP/teams_distribute_thread_limit_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target #pragma omp teams distribute thread_limit(C) for (int j=0; j<100; j++) foo(); @@ -39,7 +40,7 @@ T tmain(T argc) { #pragma omp teams distribute thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute thread_limit(argc + argc) +#pragma omp teams distribute thread_limit(argc + argc + z) for (int j=0; j<100; j++) foo(); #pragma omp target #pragma omp teams distribute thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp teams distribute' cannot contain more than one 'thread_limit' clause}} @@ -61,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams distribute thread_limit // expected-error {{expected '(' after 'thread_limit'}} for (int j=0; j<100; j++) foo(); @@ -86,7 +88,7 @@ int main(int argc, char **argv) { for (int j=0; j<100; j++) foo(); #pragma omp target -#pragma omp teams distribute thread_limit (argc + argc) +#pragma omp teams distribute thread_limit (argc + argc + z) for (int j=0; j<100; j++) foo(); #pragma omp target diff --git a/test/OpenMP/teams_firstprivate_messages.cpp b/test/OpenMP/teams_firstprivate_messages.cpp index 9bc5eeac6e..ff58f42994 100644 --- a/test/OpenMP/teams_firstprivate_messages.cpp +++ b/test/OpenMP/teams_firstprivate_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -65,7 +65,7 @@ int main(int argc, char **argv) { const int da[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; #pragma omp target #pragma omp teams firstprivate // expected-error {{expected '(' after 'firstprivate'}} @@ -98,7 +98,7 @@ int main(int argc, char **argv) { #pragma omp teams firstprivate(argv[1]) // expected-error {{expected variable name}} foo(); #pragma omp target -#pragma omp teams firstprivate(ba) +#pragma omp teams firstprivate(ba, z) foo(); #pragma omp target #pragma omp teams firstprivate(ca) diff --git a/test/OpenMP/teams_messages.cpp b/test/OpenMP/teams_messages.cpp index bba7da2e0e..b01c428118 100644 --- a/test/OpenMP/teams_messages.cpp +++ b/test/OpenMP/teams_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wuninitialized void foo() { } diff --git a/test/OpenMP/teams_num_teams_messages.cpp b/test/OpenMP/teams_num_teams_messages.cpp index 47b2b4eafe..40da396b01 100644 --- a/test/OpenMP/teams_num_teams_messages.cpp +++ b/test/OpenMP/teams_num_teams_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target #pragma omp teams num_teams(C) foo(); @@ -39,7 +40,7 @@ T tmain(T argc) { #pragma omp teams num_teams(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} foo(); #pragma omp target -#pragma omp teams num_teams(argc + argc) +#pragma omp teams num_teams(argc + argc+z) foo(); #pragma omp target #pragma omp teams num_teams(argc), num_teams (argc+1) // expected-error {{directive '#pragma omp teams' cannot contain more than one 'num_teams' clause}} @@ -61,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams num_teams // expected-error {{expected '(' after 'num_teams'}} foo(); @@ -86,7 +88,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target -#pragma omp teams num_teams (argc + argc) +#pragma omp teams num_teams (argc + argc-z) foo(); #pragma omp target diff --git a/test/OpenMP/teams_private_messages.cpp b/test/OpenMP/teams_private_messages.cpp index 5cc8a7a805..faabbb3aa1 100644 --- a/test/OpenMP/teams_private_messages.cpp +++ b/test/OpenMP/teams_private_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s +// RUN: %clang_cc1 -verify -fopenmp %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized extern int omp_default_mem_alloc; void foo() { diff --git a/test/OpenMP/teams_reduction_messages.cpp b/test/OpenMP/teams_reduction_messages.cpp index d9219cfbbb..73cce700de 100644 --- a/test/OpenMP/teams_reduction_messages.cpp +++ b/test/OpenMP/teams_reduction_messages.cpp @@ -1,10 +1,10 @@ -// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp -o - %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++98 -o - %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -o - %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -o - %s -Wno-openmp-target -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd -o - %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 -o - %s -Wno-openmp-target -Wuninitialized +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -o - %s -Wno-openmp-target -Wuninitialized extern int omp_default_mem_alloc; void foo() { @@ -86,7 +86,7 @@ T tmain(T argc) { const T d = T(); // expected-note 4 {{'d' defined here}} const T da[5] = {T()}; // expected-note 2 {{'da' defined here}} T qa[5] = {T()}; - T i; + T i, z; T &j = i; // expected-note 4 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}} @@ -132,7 +132,7 @@ T tmain(T argc) { #pragma omp teams reduction(^ : T) // expected-error {{'T' does not refer to a value}} foo(); #pragma omp target -#pragma omp teams reduction(+ : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} +#pragma omp teams reduction(+ : z, a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}} expected-error 2 {{'operator+' is a private member of 'S2'}} foo(); #pragma omp target #pragma omp teams reduction(min : a, b, c, d, f) // expected-error {{a reduction list item with incomplete type 'S1'}} expected-error 4 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}} @@ -216,7 +216,7 @@ int main(int argc, char **argv) { int qa[5] = {0}; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; // expected-note 2 {{'j' defined here}} S3 &p = k; // expected-note 2 {{'p' defined here}} const int &r = da[i]; // expected-note {{'r' defined here}} @@ -295,7 +295,7 @@ int main(int argc, char **argv) { #pragma omp teams reduction(+ : h, k, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be reduction}} foo(); #pragma omp target -#pragma omp teams reduction(+ : o) // expected-error {{no viable overloaded '='}} +#pragma omp teams reduction(+ : z, o) // expected-error {{no viable overloaded '='}} foo(); #pragma omp target #pragma omp teams private(i), reduction(+ : j), reduction(+ : q) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}} diff --git a/test/OpenMP/teams_shared_messages.cpp b/test/OpenMP/teams_shared_messages.cpp index a83b82f37f..aa7964fbd2 100644 --- a/test/OpenMP/teams_shared_messages.cpp +++ b/test/OpenMP/teams_shared_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp %s -Wno-openmp-target -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target +// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wno-openmp-target -Wuninitialized void foo() { } @@ -59,7 +59,7 @@ int main(int argc, char **argv) { const int da[5] = { 0 }; S4 e(4); S5 g(5); - int i; + int i, z; int &j = i; #pragma omp target #pragma omp teams shared // expected-error {{expected '(' after 'shared'}} @@ -101,7 +101,7 @@ int main(int argc, char **argv) { #pragma omp teams shared(da) foo(); #pragma omp target - #pragma omp teams shared(e, g) + #pragma omp teams shared(e, g, z) foo(); #pragma omp target #pragma omp teams shared(h, B::x) // expected-error 2 {{threadprivate or thread local variable cannot be shared}} diff --git a/test/OpenMP/teams_thread_limit_messages.cpp b/test/OpenMP/teams_thread_limit_messages.cpp index 0c5a22cf30..cc42c97ad8 100644 --- a/test/OpenMP/teams_thread_limit_messages.cpp +++ b/test/OpenMP/teams_thread_limit_messages.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized -// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s +// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ferror-limit 100 -o - %s -Wuninitialized void foo() { } @@ -14,6 +14,7 @@ struct S1; // expected-note 2 {{declared here}} template // expected-note {{declared here}} T tmain(T argc) { char **a; + T z; #pragma omp target #pragma omp teams thread_limit(C) foo(); @@ -39,7 +40,7 @@ T tmain(T argc) { #pragma omp teams thread_limit(argc > 0 ? a[1] : a[2]) // expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}} foo(); #pragma omp target -#pragma omp teams thread_limit(argc + argc) +#pragma omp teams thread_limit(argc + argc + z) foo(); #pragma omp target #pragma omp teams thread_limit(argc), thread_limit (argc+1) // expected-error {{directive '#pragma omp teams' cannot contain more than one 'thread_limit' clause}} @@ -61,6 +62,7 @@ T tmain(T argc) { } int main(int argc, char **argv) { + int z; #pragma omp target #pragma omp teams thread_limit // expected-error {{expected '(' after 'thread_limit'}} foo(); @@ -86,7 +88,7 @@ int main(int argc, char **argv) { foo(); #pragma omp target -#pragma omp teams thread_limit (argc + argc) +#pragma omp teams thread_limit (argc + argc - z) foo(); #pragma omp target