Index: clang/test/OpenMP/distribute_collapse_messages.cpp =================================================================== --- clang/test/OpenMP/distribute_collapse_messages.cpp +++ clang/test/OpenMP/distribute_collapse_messages.cpp @@ -42,7 +42,7 @@ // expected-note@+5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+3 2 {{directive '#pragma omp distribute' cannot contain more than one 'collapse' clause}} - // expected-error@+2 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+2 {{argument to 'collapse' clause must be a strictly positive integer value}} // expected-error@+1 2 {{expression is not an integral constant expression}} #pragma omp distribute collapse (foobool(argc)), collapse (true), collapse (-5) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; @@ -85,7 +85,7 @@ #endif // expected-error@+3 {{expression is not an integral constant expression}} // expected-error@+2 2 {{directive '#pragma omp distribute' cannot contain more than one 'collapse' clause}} - // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}} #pragma omp distribute collapse (foobool(argc)), collapse (true), collapse (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp distribute collapse (S1) // expected-error {{'S1' does not refer to a value}} Index: clang/test/OpenMP/distribute_parallel_for_collapse_messages.cpp =================================================================== --- clang/test/OpenMP/distribute_parallel_for_collapse_messages.cpp +++ clang/test/OpenMP/distribute_parallel_for_collapse_messages.cpp @@ -53,7 +53,7 @@ #pragma omp distribute parallel for collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp distribute parallel for', but found only 1}} // expected-error@+8 2 {{directive '#pragma omp distribute parallel for' cannot contain more than one 'collapse' clause}} - // expected-error@+7 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+7 {{argument to 'collapse' clause must be a strictly positive integer value}} // expected-error@+6 2 {{expression is not an integral constant expression}} #if __cplusplus >= 201103L // expected-note@+4 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} @@ -124,7 +124,7 @@ // expected-note@+6{{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+4 2 {{directive '#pragma omp distribute parallel for' cannot contain more than one 'collapse' clause}} - // expected-error@+3 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+3 {{argument to 'collapse' clause must be a strictly positive integer value}} #pragma omp target #pragma omp teams #pragma omp distribute parallel for collapse (foobool(argc)), collapse (true), collapse (-5) Index: clang/test/OpenMP/distribute_parallel_for_simd_collapse_messages.cpp =================================================================== --- clang/test/OpenMP/distribute_parallel_for_simd_collapse_messages.cpp +++ clang/test/OpenMP/distribute_parallel_for_simd_collapse_messages.cpp @@ -53,7 +53,7 @@ #pragma omp distribute parallel for simd collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp distribute parallel for simd', but found only 1}} // expected-error@+8 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'collapse' clause}} - // expected-error@+7 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+7 {{argument to 'collapse' clause must be a strictly positive integer value}} // expected-error@+6 2 {{expression is not an integral constant expression}} #if __cplusplus >= 201103L // expected-note@+4 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} @@ -124,7 +124,7 @@ // expected-note@+6{{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+4 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'collapse' clause}} - // expected-error@+3 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+3 {{argument to 'collapse' clause must be a strictly positive integer value}} #pragma omp target #pragma omp teams #pragma omp distribute parallel for simd collapse (foobool(argc)), collapse (true), collapse (-5) Index: clang/test/OpenMP/distribute_parallel_for_simd_safelen_messages.cpp =================================================================== --- clang/test/OpenMP/distribute_parallel_for_simd_safelen_messages.cpp +++ clang/test/OpenMP/distribute_parallel_for_simd_safelen_messages.cpp @@ -63,11 +63,14 @@ argv[0][i] = argv[0][i] - argv[0][i-ST]; #if __cplusplus >= 201103L - // expected-note@+4 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} + // expected-note@+7 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'safelen' clause}} expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{expression is not an integral constant expression}} +// expected-error@+3 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'safelen' clause}} +// expected-error@+2 {{argument to 'safelen' clause must be a strictly positive integer value}} +// expected-error@+1 2 {{expression is not an integral constant expression}} +#pragma omp distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; @@ -144,11 +147,14 @@ argv[0][i] = argv[0][i] - argv[0][i-4]; #if __cplusplus >= 201103L - // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}} + // expected-note@+7 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif #pragma omp target #pragma omp teams -#pragma omp parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'safelen' clause}} expected-error {{expression is not an integral constant expression}} +// expected-error@+3 {{argument to 'safelen' clause must be a strictly positive integer value}} +// expected-error@+2 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'safelen' clause}} +// expected-error@+1 {{expression is not an integral constant expression}} +#pragma omp parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; Index: clang/test/OpenMP/distribute_parallel_for_simd_simdlen_messages.cpp =================================================================== --- clang/test/OpenMP/distribute_parallel_for_simd_simdlen_messages.cpp +++ clang/test/OpenMP/distribute_parallel_for_simd_simdlen_messages.cpp @@ -66,11 +66,14 @@ argv[0][i] = argv[0][i] - argv[0][i-ST]; #if __cplusplus >= 201103L - // expected-note@+4 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} + // expected-note@+7 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd simdlen (foobool(argc)), simdlen (true), simdlen (-5) // expected-error 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'simdlen' clause}} expected-error 2 {{argument to 'simdlen' clause must be a strictly positive integer value}} expected-error 2 {{expression is not an integral constant expression}} +// expected-error@+3 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'simdlen' clause}} +// expected-error@+2 {{argument to 'simdlen' clause must be a strictly positive integer value}} +// expected-error@+1 2 {{expression is not an integral constant expression}} +#pragma omp distribute parallel for simd simdlen (foobool(argc)), simdlen (true), simdlen (-5) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; @@ -148,11 +151,14 @@ #if __cplusplus >= 201103L - // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}} + // expected-note@+7 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif #pragma omp target #pragma omp teams -#pragma omp distribute parallel for simd simdlen (foobool(argc)), simdlen (true), simdlen (-5) // expected-error {{expression is not an integral constant expression}} expected-error 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'simdlen' clause}} expected-error 2 {{argument to 'simdlen' clause must be a strictly positive integer value}} +// expected-error@+3 {{expression is not an integral constant expression}} +// expected-error@+2 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'simdlen' clause}} +// expected-error@+1 {{argument to 'simdlen' clause must be a strictly positive integer value}} +#pragma omp distribute parallel for simd simdlen (foobool(argc)), simdlen (true), simdlen (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; Index: clang/test/OpenMP/distribute_simd_collapse_messages.cpp =================================================================== --- clang/test/OpenMP/distribute_simd_collapse_messages.cpp +++ clang/test/OpenMP/distribute_simd_collapse_messages.cpp @@ -53,7 +53,7 @@ #pragma omp distribute simd collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp distribute simd', but found only 1}} // expected-error@+8 2 {{directive '#pragma omp distribute simd' cannot contain more than one 'collapse' clause}} - // expected-error@+7 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+7 {{argument to 'collapse' clause must be a strictly positive integer value}} // expected-error@+6 2 {{expression is not an integral constant expression}} #if __cplusplus >= 201103L // expected-note@+4 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} @@ -124,7 +124,7 @@ // expected-note@+6{{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+4 2 {{directive '#pragma omp distribute simd' cannot contain more than one 'collapse' clause}} - // expected-error@+3 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+3 {{argument to 'collapse' clause must be a strictly positive integer value}} #pragma omp target #pragma omp teams #pragma omp distribute simd collapse (foobool(argc)), collapse (true), collapse (-5) Index: clang/test/OpenMP/distribute_simd_safelen_messages.cpp =================================================================== --- clang/test/OpenMP/distribute_simd_safelen_messages.cpp +++ clang/test/OpenMP/distribute_simd_safelen_messages.cpp @@ -63,11 +63,14 @@ argv[0][i] = argv[0][i] - argv[0][i-ST]; #if __cplusplus >= 201103L - // expected-note@+4 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} + // expected-note@+7 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif #pragma omp target #pragma omp teams -#pragma omp distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{directive '#pragma omp distribute simd' cannot contain more than one 'safelen' clause}} expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{expression is not an integral constant expression}} +// expected-error@+3 2 {{directive '#pragma omp distribute simd' cannot contain more than one 'safelen' clause}} +// expected-error@+2 {{argument to 'safelen' clause must be a strictly positive integer value}} +// expected-error@+1 2 {{expression is not an integral constant expression}} +#pragma omp distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; @@ -144,11 +147,14 @@ argv[0][i] = argv[0][i] - argv[0][i-4]; #if __cplusplus >= 201103L - // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}} + // expected-note@+7 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif #pragma omp target #pragma omp teams -#pragma omp parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'safelen' clause}} expected-error {{expression is not an integral constant expression}} +// expected-error@+3 {{argument to 'safelen' clause must be a strictly positive integer value}} +// expected-error@+2 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'safelen' clause}} +// expected-error@+1 {{expression is not an integral constant expression}} +#pragma omp parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; Index: clang/test/OpenMP/distribute_simd_simdlen_messages.cpp =================================================================== --- clang/test/OpenMP/distribute_simd_simdlen_messages.cpp +++ clang/test/OpenMP/distribute_simd_simdlen_messages.cpp @@ -63,11 +63,14 @@ argv[0][i] = argv[0][i] - argv[0][i-ST]; #if __cplusplus >= 201103L - // expected-note@+4 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} + // expected-note@+7 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif #pragma omp target #pragma omp teams -#pragma omp distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{directive '#pragma omp distribute simd' cannot contain more than one 'safelen' clause}} expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{expression is not an integral constant expression}} +// expected-error@+3 2 {{directive '#pragma omp distribute simd' cannot contain more than one 'safelen' clause}} +// expected-error@+2 {{argument to 'safelen' clause must be a strictly positive integer value}} +// expected-error@+1 2 {{expression is not an integral constant expression}} +#pragma omp distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; @@ -144,11 +147,14 @@ argv[0][i] = argv[0][i] - argv[0][i-4]; #if __cplusplus >= 201103L - // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}} + // expected-note@+7 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif #pragma omp target #pragma omp teams -#pragma omp parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'safelen' clause}} expected-error {{expression is not an integral constant expression}} +// expected-error@+3 {{argument to 'safelen' clause must be a strictly positive integer value}} +// expected-error@+2 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'safelen' clause}} +// expected-error@+1 {{expression is not an integral constant expression}} +#pragma omp parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; Index: clang/test/OpenMP/for_collapse_messages.cpp =================================================================== --- clang/test/OpenMP/for_collapse_messages.cpp +++ clang/test/OpenMP/for_collapse_messages.cpp @@ -39,7 +39,7 @@ #pragma omp for collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp for', but found only 1}} // expected-error@+6 2 {{directive '#pragma omp for' cannot contain more than one 'collapse' clause}} - // expected-error@+5 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+5 {{argument to 'collapse' clause must be a strictly positive integer value}} // expected-error@+4 2 {{expression is not an integral constant expression}} #if __cplusplus >= 201103L // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} @@ -86,7 +86,7 @@ // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+2 2 {{directive '#pragma omp for' cannot contain more than one 'collapse' clause}} - // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}} #pragma omp for collapse (foobool(argc)), collapse (true), collapse (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp for collapse (S1) // expected-error {{'S1' does not refer to a value}} Index: clang/test/OpenMP/for_ordered_clause.cpp =================================================================== --- clang/test/OpenMP/for_ordered_clause.cpp +++ clang/test/OpenMP/for_ordered_clause.cpp @@ -47,7 +47,7 @@ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i - ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp for', but found only 1}} // expected-error@+6 2 {{directive '#pragma omp for' cannot contain more than one 'ordered' clause}} -// expected-error@+5 2 {{argument to 'ordered' clause must be a strictly positive integer value}} +// expected-error@+5 {{argument to 'ordered' clause must be a strictly positive integer value}} // expected-error@+4 2 {{expression is not an integral constant expression}} #if __cplusplus >= 201103L // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} @@ -113,7 +113,7 @@ // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+2 2 {{directive '#pragma omp for' cannot contain more than one 'ordered' clause}} -// expected-error@+1 2 {{argument to 'ordered' clause must be a strictly positive integer value}} +// expected-error@+1 {{argument to 'ordered' clause must be a strictly positive integer value}} #pragma omp for ordered(foobool(argc)), ordered(true), ordered(-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i - 4]; Index: clang/test/OpenMP/for_simd_collapse_messages.cpp =================================================================== --- clang/test/OpenMP/for_simd_collapse_messages.cpp +++ clang/test/OpenMP/for_simd_collapse_messages.cpp @@ -39,7 +39,7 @@ #pragma omp for simd collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp for simd', but found only 1}} // expected-error@+6 2 {{directive '#pragma omp for simd' cannot contain more than one 'collapse' clause}} - // expected-error@+5 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+5 {{argument to 'collapse' clause must be a strictly positive integer value}} // expected-error@+4 2 {{expression is not an integral constant expression}} #if __cplusplus >= 201103L // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} @@ -86,7 +86,7 @@ // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+2 2 {{directive '#pragma omp for simd' cannot contain more than one 'collapse' clause}} - // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}} #pragma omp for simd collapse (foobool(argc)), collapse (true), collapse (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp for simd collapse (S1) // expected-error {{'S1' does not refer to a value}} Index: clang/test/OpenMP/for_simd_safelen_messages.cpp =================================================================== --- clang/test/OpenMP/for_simd_safelen_messages.cpp +++ clang/test/OpenMP/for_simd_safelen_messages.cpp @@ -39,7 +39,7 @@ #pragma omp for simd safelen ((ST > 0) ? 1 + ST : 2) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+6 2 {{directive '#pragma omp for simd' cannot contain more than one 'safelen' clause}} - // expected-error@+5 2 {{argument to 'safelen' clause must be a strictly positive integer value}} + // expected-error@+5 {{argument to 'safelen' clause must be a strictly positive integer value}} // expected-error@+4 2 {{expression is not an integral constant expression}} #if __cplusplus >= 201103L // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} @@ -84,7 +84,7 @@ // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+2 2 {{directive '#pragma omp for simd' cannot contain more than one 'safelen' clause}} - // expected-error@+1 2 {{argument to 'safelen' clause must be a strictly positive integer value}} + // expected-error@+1 {{argument to 'safelen' clause must be a strictly positive integer value}} #pragma omp for simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp for simd safelen (S1) // expected-error {{'S1' does not refer to a value}} Index: clang/test/OpenMP/for_simd_simdlen_messages.cpp =================================================================== --- clang/test/OpenMP/for_simd_simdlen_messages.cpp +++ clang/test/OpenMP/for_simd_simdlen_messages.cpp @@ -39,7 +39,7 @@ #pragma omp for simd simdlen ((ST > 0) ? 1 + ST : 2) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+6 2 {{directive '#pragma omp for simd' cannot contain more than one 'simdlen' clause}} - // expected-error@+5 2 {{argument to 'simdlen' clause must be a strictly positive integer value}} + // expected-error@+5 {{argument to 'simdlen' clause must be a strictly positive integer value}} // expected-error@+4 2 {{expression is not an integral constant expression}} #if __cplusplus >= 201103L // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} @@ -84,7 +84,7 @@ // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+2 2 {{directive '#pragma omp for simd' cannot contain more than one 'simdlen' clause}} - // expected-error@+1 2 {{argument to 'simdlen' clause must be a strictly positive integer value}} + // expected-error@+1 {{argument to 'simdlen' clause must be a strictly positive integer value}} #pragma omp for simd simdlen (foobool(argc)), simdlen (true), simdlen (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp for simd simdlen (S1) // expected-error {{'S1' does not refer to a value}} Index: clang/test/OpenMP/parallel_for_collapse_messages.cpp =================================================================== --- clang/test/OpenMP/parallel_for_collapse_messages.cpp +++ clang/test/OpenMP/parallel_for_collapse_messages.cpp @@ -39,7 +39,7 @@ #pragma omp parallel for collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp parallel for', but found only 1}} // expected-error@+6 2 {{directive '#pragma omp parallel for' cannot contain more than one 'collapse' clause}} - // expected-error@+5 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+5 {{argument to 'collapse' clause must be a strictly positive integer value}} // expected-error@+4 2 {{expression is not an integral constant expression}} #if __cplusplus >= 201103L // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} @@ -86,7 +86,7 @@ // expected-note@+4{{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+2 2 {{directive '#pragma omp parallel for' cannot contain more than one 'collapse' clause}} - // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}} #pragma omp parallel for collapse (foobool(argc)), collapse (true), collapse (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp parallel for collapse (S1) // expected-error {{'S1' does not refer to a value}} Index: clang/test/OpenMP/parallel_for_ordered_messages.cpp =================================================================== --- clang/test/OpenMP/parallel_for_ordered_messages.cpp +++ clang/test/OpenMP/parallel_for_ordered_messages.cpp @@ -46,7 +46,7 @@ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i - ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp parallel for', but found only 1}} // expected-error@+6 2 {{directive '#pragma omp parallel for' cannot contain more than one 'ordered' clause}} -// expected-error@+5 2 {{argument to 'ordered' clause must be a strictly positive integer value}} +// expected-error@+5 {{argument to 'ordered' clause must be a strictly positive integer value}} // expected-error@+4 2 {{expression is not an integral constant expression}} #if __cplusplus >= 201103L // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} @@ -104,7 +104,7 @@ // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+2 2 {{directive '#pragma omp parallel for' cannot contain more than one 'ordered' clause}} -// expected-error@+1 2 {{argument to 'ordered' clause must be a strictly positive integer value}} +// expected-error@+1 {{argument to 'ordered' clause must be a strictly positive integer value}} #pragma omp parallel for ordered(foobool(argc)), ordered(true), ordered(-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i - 4]; Index: clang/test/OpenMP/parallel_for_simd_collapse_messages.cpp =================================================================== --- clang/test/OpenMP/parallel_for_simd_collapse_messages.cpp +++ clang/test/OpenMP/parallel_for_simd_collapse_messages.cpp @@ -39,7 +39,7 @@ #pragma omp parallel for simd collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp parallel for simd', but found only 1}} // expected-error@+6 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'collapse' clause}} - // expected-error@+5 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+5 {{argument to 'collapse' clause must be a strictly positive integer value}} // expected-error@+4 2 {{expression is not an integral constant expression}} #if __cplusplus >= 201103L // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} @@ -86,7 +86,7 @@ // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+2 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'collapse' clause}} - // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}} #pragma omp parallel for simd collapse (foobool(argc)), collapse (true), collapse (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp parallel for simd collapse (S1) // expected-error {{'S1' does not refer to a value}} Index: clang/test/OpenMP/parallel_for_simd_safelen_messages.cpp =================================================================== --- clang/test/OpenMP/parallel_for_simd_safelen_messages.cpp +++ clang/test/OpenMP/parallel_for_simd_safelen_messages.cpp @@ -39,7 +39,7 @@ #pragma omp parallel for simd safelen ((ST > 0) ? 1 + ST : 2) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+6 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'safelen' clause}} - // expected-error@+5 2 {{argument to 'safelen' clause must be a strictly positive integer value}} + // expected-error@+5 {{argument to 'safelen' clause must be a strictly positive integer value}} // expected-error@+4 2 {{expression is not an integral constant expression}} #if __cplusplus >= 201103L // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} @@ -84,7 +84,7 @@ // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+2 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'safelen' clause}} - // expected-error@+1 2 {{argument to 'safelen' clause must be a strictly positive integer value}} + // expected-error@+1 {{argument to 'safelen' clause must be a strictly positive integer value}} #pragma omp parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp parallel for simd safelen (S1) // expected-error {{'S1' does not refer to a value}} Index: clang/test/OpenMP/parallel_for_simd_simdlen_messages.cpp =================================================================== --- clang/test/OpenMP/parallel_for_simd_simdlen_messages.cpp +++ clang/test/OpenMP/parallel_for_simd_simdlen_messages.cpp @@ -39,7 +39,7 @@ #pragma omp parallel for simd simdlen ((ST > 0) ? 1 + ST : 2) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+6 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'simdlen' clause}} - // expected-error@+5 2 {{argument to 'simdlen' clause must be a strictly positive integer value}} + // expected-error@+5 {{argument to 'simdlen' clause must be a strictly positive integer value}} // expected-error@+4 2 {{expression is not an integral constant expression}} #if __cplusplus >= 201103L // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} @@ -84,7 +84,7 @@ // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+2 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'simdlen' clause}} - // expected-error@+1 2 {{argument to 'simdlen' clause must be a strictly positive integer value}} + // expected-error@+1 {{argument to 'simdlen' clause must be a strictly positive integer value}} #pragma omp parallel for simd simdlen (foobool(argc)), simdlen (true), simdlen (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp parallel for simd simdlen (S1) // expected-error {{'S1' does not refer to a value}} Index: clang/test/OpenMP/simd_collapse_messages.cpp =================================================================== --- clang/test/OpenMP/simd_collapse_messages.cpp +++ clang/test/OpenMP/simd_collapse_messages.cpp @@ -39,7 +39,7 @@ #pragma omp simd collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp simd', but found only 1}} // expected-error@+6 2 {{directive '#pragma omp simd' cannot contain more than one 'collapse' clause}} - // expected-error@+5 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+5 {{argument to 'collapse' clause must be a strictly positive integer value}} // expected-error@+4 2 {{expression is not an integral constant expression}} #if __cplusplus >= 201103L // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} @@ -86,7 +86,7 @@ // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+2 2 {{directive '#pragma omp simd' cannot contain more than one 'collapse' clause}} - // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}} #pragma omp simd collapse (foobool(argc)), collapse (true), collapse (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp simd collapse (S1) // expected-error {{'S1' does not refer to a value}} Index: clang/test/OpenMP/simd_safelen_messages.cpp =================================================================== --- clang/test/OpenMP/simd_safelen_messages.cpp +++ clang/test/OpenMP/simd_safelen_messages.cpp @@ -39,7 +39,7 @@ #pragma omp simd safelen ((ST > 0) ? 1 + ST : 2) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+6 2 {{directive '#pragma omp simd' cannot contain more than one 'safelen' clause}} - // expected-error@+5 2 {{argument to 'safelen' clause must be a strictly positive integer value}} + // expected-error@+5 {{argument to 'safelen' clause must be a strictly positive integer value}} // expected-error@+4 2 {{expression is not an integral constant expression}} #if __cplusplus >= 201103L // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} @@ -84,7 +84,7 @@ // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+2 2 {{directive '#pragma omp simd' cannot contain more than one 'safelen' clause}} - // expected-error@+1 2 {{argument to 'safelen' clause must be a strictly positive integer value}} + // expected-error@+1 {{argument to 'safelen' clause must be a strictly positive integer value}} #pragma omp simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp simd safelen (S1) // expected-error {{'S1' does not refer to a value}} Index: clang/test/OpenMP/simd_simdlen_messages.cpp =================================================================== --- clang/test/OpenMP/simd_simdlen_messages.cpp +++ clang/test/OpenMP/simd_simdlen_messages.cpp @@ -39,7 +39,7 @@ #pragma omp simd simdlen ((ST > 0) ? 1 + ST : 2) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+6 2 {{directive '#pragma omp simd' cannot contain more than one 'simdlen' clause}} - // expected-error@+5 2 {{argument to 'simdlen' clause must be a strictly positive integer value}} + // expected-error@+5 {{argument to 'simdlen' clause must be a strictly positive integer value}} // expected-error@+4 2 {{expression is not an integral constant expression}} #if __cplusplus >= 201103L // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} @@ -84,7 +84,7 @@ // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+2 2 {{directive '#pragma omp simd' cannot contain more than one 'simdlen' clause}} - // expected-error@+1 2 {{argument to 'simdlen' clause must be a strictly positive integer value}} + // expected-error@+1 {{argument to 'simdlen' clause must be a strictly positive integer value}} #pragma omp simd simdlen (foobool(argc)), simdlen (true), simdlen (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp simd simdlen (S1) // expected-error {{'S1' does not refer to a value}} Index: clang/test/OpenMP/target_parallel_for_collapse_messages.cpp =================================================================== --- clang/test/OpenMP/target_parallel_for_collapse_messages.cpp +++ clang/test/OpenMP/target_parallel_for_collapse_messages.cpp @@ -39,7 +39,7 @@ #pragma omp target parallel for collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp target parallel for', but found only 1}} // expected-error@+3 2 {{directive '#pragma omp target parallel for' cannot contain more than one 'collapse' clause}} - // expected-error@+2 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+2 {{argument to 'collapse' clause must be a strictly positive integer value}} // expected-error@+1 2 {{expression is not an integral constant expression}} #pragma omp target parallel for collapse (foobool(argc)), collapse (true), collapse (-5) #if __cplusplus >= 201103L @@ -82,7 +82,7 @@ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error@+3 {{expression is not an integral constant expression}} // expected-error@+2 2 {{directive '#pragma omp target parallel for' cannot contain more than one 'collapse' clause}} - // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}} #pragma omp target parallel for collapse (foobool(argc)), collapse (true), collapse (-5) #if __cplusplus >= 201103L // expected-note@-2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} Index: clang/test/OpenMP/target_parallel_for_ordered_messages.cpp =================================================================== --- clang/test/OpenMP/target_parallel_for_ordered_messages.cpp +++ clang/test/OpenMP/target_parallel_for_ordered_messages.cpp @@ -49,7 +49,7 @@ // expected-note@+5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+3 2 {{directive '#pragma omp target parallel for' cannot contain more than one 'ordered' clause}} -// expected-error@+2 2 {{argument to 'ordered' clause must be a strictly positive integer value}} +// expected-error@+2 {{argument to 'ordered' clause must be a strictly positive integer value}} // expected-error@+1 2 {{expression is not an integral constant expression}} #pragma omp target parallel for ordered(foobool(argc)), ordered(true), ordered(-5) for (int i = ST; i < N; i++) @@ -103,7 +103,7 @@ #endif // expected-error@+3 {{expression is not an integral constant expression}} // expected-error@+2 2 {{directive '#pragma omp target parallel for' cannot contain more than one 'ordered' clause}} -// expected-error@+1 2 {{argument to 'ordered' clause must be a strictly positive integer value}} +// expected-error@+1 {{argument to 'ordered' clause must be a strictly positive integer value}} #pragma omp target parallel for ordered(foobool(argc)), ordered(true), ordered(-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i - 4]; Index: clang/test/OpenMP/target_parallel_for_simd_collapse_messages.cpp =================================================================== --- clang/test/OpenMP/target_parallel_for_simd_collapse_messages.cpp +++ clang/test/OpenMP/target_parallel_for_simd_collapse_messages.cpp @@ -43,7 +43,7 @@ // expected-note@+5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+3 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'collapse' clause}} - // expected-error@+2 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+2 {{argument to 'collapse' clause must be a strictly positive integer value}} // expected-error@+1 2 {{expression is not an integral constant expression}} #pragma omp target parallel for simd collapse (foobool(argc)), collapse (true), collapse (-5) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; @@ -84,7 +84,7 @@ #endif // expected-error@+3 {{expression is not an integral constant expression}} // expected-error@+2 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'collapse' clause}} - // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}} #pragma omp target parallel for simd collapse (foobool(argc)), collapse (true), collapse (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp target parallel for simd collapse (S1) // expected-error {{'S1' does not refer to a value}} Index: clang/test/OpenMP/target_parallel_for_simd_ordered_messages.cpp =================================================================== --- clang/test/OpenMP/target_parallel_for_simd_ordered_messages.cpp +++ clang/test/OpenMP/target_parallel_for_simd_ordered_messages.cpp @@ -47,7 +47,7 @@ #pragma omp target parallel for simd ordered((ST > 0) ? 1 + ST : 2) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i - ST]; -// expected-error@+3 2 {{argument to 'ordered' clause must be a strictly positive integer value}} +// expected-error@+3 {{argument to 'ordered' clause must be a strictly positive integer value}} // expected-error@+2 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'ordered' clause}} // expected-error@+1 {{'ordered' clause with a parameter can not be specified in '#pragma omp target parallel for simd' directive}} #pragma omp target parallel for simd ordered(foobool(argc)), ordered(true), ordered(-5) @@ -105,7 +105,7 @@ #endif // expected-error@+3 {{expression is not an integral constant expression}} // expected-error@+2 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'ordered' clause}} -// expected-error@+1 2 {{argument to 'ordered' clause must be a strictly positive integer value}} +// expected-error@+1 {{argument to 'ordered' clause must be a strictly positive integer value}} #pragma omp target parallel for simd ordered(foobool(argc)), ordered(true), ordered(-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i - 4]; Index: clang/test/OpenMP/target_parallel_for_simd_safelen_messages.cpp =================================================================== --- clang/test/OpenMP/target_parallel_for_simd_safelen_messages.cpp +++ clang/test/OpenMP/target_parallel_for_simd_safelen_messages.cpp @@ -39,7 +39,7 @@ #pragma omp target parallel for simd safelen ((ST > 0) ? 1 + ST : 2) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+6 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'safelen' clause}} - // expected-error@+5 2 {{argument to 'safelen' clause must be a strictly positive integer value}} + // expected-error@+5 {{argument to 'safelen' clause must be a strictly positive integer value}} // expected-error@+4 2 {{expression is not an integral constant expression}} #if __cplusplus >= 201103L // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} @@ -84,7 +84,7 @@ // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+2 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'safelen' clause}} - // expected-error@+1 2 {{argument to 'safelen' clause must be a strictly positive integer value}} + // expected-error@+1 {{argument to 'safelen' clause must be a strictly positive integer value}} #pragma omp target parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp target parallel for simd safelen (S1) // expected-error {{'S1' does not refer to a value}} Index: clang/test/OpenMP/target_parallel_for_simd_simdlen_messages.cpp =================================================================== --- clang/test/OpenMP/target_parallel_for_simd_simdlen_messages.cpp +++ clang/test/OpenMP/target_parallel_for_simd_simdlen_messages.cpp @@ -46,7 +46,7 @@ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+6 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'simdlen' clause}} - // expected-error@+5 2 {{argument to 'simdlen' clause must be a strictly positive integer value}} + // expected-error@+5 {{argument to 'simdlen' clause must be a strictly positive integer value}} // expected-error@+4 2 {{expression is not an integral constant expression}} #if __cplusplus >= 201103L // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} @@ -111,7 +111,7 @@ // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+2 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'simdlen' clause}} -// expected-error@+1 2 {{argument to 'simdlen' clause must be a strictly positive integer value}} +// expected-error@+1 {{argument to 'simdlen' clause must be a strictly positive integer value}} #pragma omp target parallel for simd simdlen (foobool(argc)), simdlen (true), simdlen (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; Index: clang/test/OpenMP/target_simd_collapse_messages.cpp =================================================================== --- clang/test/OpenMP/target_simd_collapse_messages.cpp +++ clang/test/OpenMP/target_simd_collapse_messages.cpp @@ -41,7 +41,7 @@ // expected-note@+5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+3 2 {{directive '#pragma omp target simd' cannot contain more than one 'collapse' clause}} - // expected-error@+2 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+2 {{argument to 'collapse' clause must be a strictly positive integer value}} // expected-error@+1 2 {{expression is not an integral constant expression}} #pragma omp target simd collapse (foobool(argc)), collapse (true), collapse (-5) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; @@ -82,7 +82,7 @@ #endif // expected-error@+3 {{expression is not an integral constant expression}} // expected-error@+2 2 {{directive '#pragma omp target simd' cannot contain more than one 'collapse' clause}} - // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}} #pragma omp target simd collapse (foobool(argc)), collapse (true), collapse (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp target simd collapse (S1) // expected-error {{'S1' does not refer to a value}} Index: clang/test/OpenMP/target_simd_safelen_messages.cpp =================================================================== --- clang/test/OpenMP/target_simd_safelen_messages.cpp +++ clang/test/OpenMP/target_simd_safelen_messages.cpp @@ -39,7 +39,7 @@ #pragma omp target simd safelen ((ST > 0) ? 1 + ST : 2) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+6 2 {{directive '#pragma omp target simd' cannot contain more than one 'safelen' clause}} - // expected-error@+5 2 {{argument to 'safelen' clause must be a strictly positive integer value}} + // expected-error@+5 {{argument to 'safelen' clause must be a strictly positive integer value}} // expected-error@+4 2 {{expression is not an integral constant expression}} #if __cplusplus >= 201103L // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} @@ -84,7 +84,7 @@ // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+2 2 {{directive '#pragma omp target simd' cannot contain more than one 'safelen' clause}} - // expected-error@+1 2 {{argument to 'safelen' clause must be a strictly positive integer value}} + // expected-error@+1 {{argument to 'safelen' clause must be a strictly positive integer value}} #pragma omp target simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp target simd safelen (S1) // expected-error {{'S1' does not refer to a value}} Index: clang/test/OpenMP/target_simd_simdlen_messages.cpp =================================================================== --- clang/test/OpenMP/target_simd_simdlen_messages.cpp +++ clang/test/OpenMP/target_simd_simdlen_messages.cpp @@ -46,7 +46,7 @@ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+6 2 {{directive '#pragma omp target simd' cannot contain more than one 'simdlen' clause}} - // expected-error@+5 2 {{argument to 'simdlen' clause must be a strictly positive integer value}} + // expected-error@+5 {{argument to 'simdlen' clause must be a strictly positive integer value}} // expected-error@+4 2 {{expression is not an integral constant expression}} #if __cplusplus >= 201103L // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} @@ -111,7 +111,7 @@ // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+2 2 {{directive '#pragma omp target simd' cannot contain more than one 'simdlen' clause}} -// expected-error@+1 2 {{argument to 'simdlen' clause must be a strictly positive integer value}} +// expected-error@+1 {{argument to 'simdlen' clause must be a strictly positive integer value}} #pragma omp target simd simdlen (foobool(argc)), simdlen (true), simdlen (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; Index: clang/test/OpenMP/target_teams_distribute_collapse_messages.cpp =================================================================== --- clang/test/OpenMP/target_teams_distribute_collapse_messages.cpp +++ clang/test/OpenMP/target_teams_distribute_collapse_messages.cpp @@ -56,7 +56,7 @@ // expected-note@+5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+3 2 {{directive '#pragma omp target teams distribute' cannot contain more than one 'collapse' clause}} -// expected-error@+2 2 {{argument to 'collapse' clause must be a strictly positive integer value}} +// expected-error@+2 {{argument to 'collapse' clause must be a strictly positive integer value}} // expected-error@+1 2 {{expression is not an integral constant expression}} #pragma omp target teams distribute collapse (foobool(argc)), collapse (true), collapse (-5) for (int i = ST; i < N; i++) @@ -122,7 +122,7 @@ #endif // expected-error@+3 {{expression is not an integral constant expression}} // expected-error@+2 2 {{directive '#pragma omp target teams distribute' cannot contain more than one 'collapse' clause}} -// expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}} +// expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}} #pragma omp target teams distribute collapse (foobool(argc)), collapse (true), collapse (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; Index: clang/test/OpenMP/target_teams_distribute_parallel_for_collapse_messages.cpp =================================================================== --- clang/test/OpenMP/target_teams_distribute_parallel_for_collapse_messages.cpp +++ clang/test/OpenMP/target_teams_distribute_parallel_for_collapse_messages.cpp @@ -56,7 +56,7 @@ // expected-note@+5 2 {{non-constexpr function 'foobool' cannot be used}} #endif // expected-error@+3 2 {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'collapse' clause}} -// expected-error@+2 2 {{argument to 'collapse' clause must be a strictly positive integer value}} +// expected-error@+2 {{argument to 'collapse' clause must be a strictly positive integer value}} // expected-error@+1 2 {{expression is not an integral constant expression}} #pragma omp target teams distribute parallel for collapse (foobool(argc)), collapse (true), collapse (-5) for (int i = ST; i < N; i++) @@ -121,7 +121,7 @@ #endif // expected-error@+3 {{expression is not an integral constant expression}} // expected-error@+2 2 {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'collapse' clause}} -// expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}} +// expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}} #pragma omp target teams distribute parallel for collapse (foobool(argc)), collapse (true), collapse (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; Index: clang/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_messages.cpp =================================================================== --- clang/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_messages.cpp +++ clang/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_messages.cpp @@ -56,7 +56,7 @@ // expected-note@+5 2 {{non-constexpr function 'foobool' cannot be used}} #endif // expected-error@+3 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'collapse' clause}} -// expected-error@+2 2 {{argument to 'collapse' clause must be a strictly positive integer value}} +// expected-error@+2 {{argument to 'collapse' clause must be a strictly positive integer value}} // expected-error@+1 2 {{expression is not an integral constant expression}} #pragma omp target teams distribute parallel for simd collapse (foobool(argc)), collapse (true), collapse (-5) for (int i = ST; i < N; i++) @@ -121,7 +121,7 @@ #endif // expected-error@+3 {{expression is not an integral constant expression}} // expected-error@+2 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'collapse' clause}} -// expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}} +// expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}} #pragma omp target teams distribute parallel for simd collapse (foobool(argc)), collapse (true), collapse (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; Index: clang/test/OpenMP/target_teams_distribute_parallel_for_simd_safelen_messages.cpp =================================================================== --- clang/test/OpenMP/target_teams_distribute_parallel_for_simd_safelen_messages.cpp +++ clang/test/OpenMP/target_teams_distribute_parallel_for_simd_safelen_messages.cpp @@ -49,9 +49,12 @@ argv[0][i] = argv[0][i] - argv[0][i-ST]; #if __cplusplus >= 201103L - // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} + // expected-note@+5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif -#pragma omp target teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'safelen' clause}} expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{expression is not an integral constant expression}} +// expected-error@+3 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'safelen' clause}} +// expected-error@+2 {{argument to 'safelen' clause must be a strictly positive integer value}} +// expected-error@+1 2 {{expression is not an integral constant expression}} +#pragma omp target teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; @@ -108,9 +111,12 @@ 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}} + // expected-note@+5 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif -#pragma omp target teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'safelen' clause}} expected-error {{expression is not an integral constant expression}} +// expected-error@+3 {{argument to 'safelen' clause must be a strictly positive integer value}} +// expected-error@+2 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'safelen' clause}} +// expected-error@+1 {{expression is not an integral constant expression}} +#pragma omp target teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; Index: clang/test/OpenMP/target_teams_distribute_parallel_for_simd_simdlen_messages.cpp =================================================================== --- clang/test/OpenMP/target_teams_distribute_parallel_for_simd_simdlen_messages.cpp +++ clang/test/OpenMP/target_teams_distribute_parallel_for_simd_simdlen_messages.cpp @@ -49,9 +49,12 @@ argv[0][i] = argv[0][i] - argv[0][i-ST]; #if __cplusplus >= 201103L - // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} + // expected-note@+5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif -#pragma omp target teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'safelen' clause}} expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{expression is not an integral constant expression}} +// expected-error@+3 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'safelen' clause}} +// expected-error@+2 {{argument to 'safelen' clause must be a strictly positive integer value}} +// expected-error@+1 2 {{expression is not an integral constant expression}} +#pragma omp target teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; @@ -108,9 +111,12 @@ 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}} + // expected-note@+5 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif -#pragma omp target teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'safelen' clause}} expected-error {{expression is not an integral constant expression}} +// expected-error@+3 {{argument to 'safelen' clause must be a strictly positive integer value}} +// expected-error@+2 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'safelen' clause}} +// expected-error@+1 {{expression is not an integral constant expression}} +#pragma omp target teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; Index: clang/test/OpenMP/target_teams_distribute_simd_collapse_messages.cpp =================================================================== --- clang/test/OpenMP/target_teams_distribute_simd_collapse_messages.cpp +++ clang/test/OpenMP/target_teams_distribute_simd_collapse_messages.cpp @@ -53,7 +53,7 @@ argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp target teams distribute simd', but found only 1}} // expected-error@+6 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'collapse' clause}} -// expected-error@+5 2 {{argument to 'collapse' clause must be a strictly positive integer value}} +// expected-error@+5 {{argument to 'collapse' clause must be a strictly positive integer value}} // expected-error@+4 2 {{expression is not an integral constant expression}} #if __cplusplus >= 201103L // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} @@ -118,7 +118,7 @@ // expected-error@+6 {{expression is not an integral constant expression}} // expected-error@+5 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'collapse' clause}} -// expected-error@+4 2 {{argument to 'collapse' clause must be a strictly positive integer value}} +// expected-error@+4 {{argument to 'collapse' clause must be a strictly positive integer value}} #if __cplusplus >= 201103L // expected-note@+2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif Index: clang/test/OpenMP/target_teams_distribute_simd_safelen_messages.cpp =================================================================== --- clang/test/OpenMP/target_teams_distribute_simd_safelen_messages.cpp +++ clang/test/OpenMP/target_teams_distribute_simd_safelen_messages.cpp @@ -49,9 +49,12 @@ argv[0][i] = argv[0][i] - argv[0][i-ST]; #if __cplusplus >= 201103L - // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} + // expected-note@+5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif -#pragma omp target teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'safelen' clause}} expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{expression is not an integral constant expression}} +// expected-error@+3 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'safelen' clause}} +// expected-error@+2 {{argument to 'safelen' clause must be a strictly positive integer value}} +// expected-error@+1 2 {{expression is not an integral constant expression}} +#pragma omp target teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; @@ -108,9 +111,12 @@ 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}} + // expected-note@+5 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif -#pragma omp target teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'safelen' clause}} expected-error {{expression is not an integral constant expression}} +// expected-error@+3 {{argument to 'safelen' clause must be a strictly positive integer value}} +// expected-error@+2 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'safelen' clause}} +// expected-error@+1 {{expression is not an integral constant expression}} +#pragma omp target teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; Index: clang/test/OpenMP/target_teams_distribute_simd_simdlen_messages.cpp =================================================================== --- clang/test/OpenMP/target_teams_distribute_simd_simdlen_messages.cpp +++ clang/test/OpenMP/target_teams_distribute_simd_simdlen_messages.cpp @@ -49,9 +49,12 @@ argv[0][i] = argv[0][i] - argv[0][i-ST]; #if __cplusplus >= 201103L - // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} + // expected-note@+5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif -#pragma omp target teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'safelen' clause}} expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{expression is not an integral constant expression}} +// expected-error@+3 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'safelen' clause}} +// expected-error@+2 {{argument to 'safelen' clause must be a strictly positive integer value}} +// expected-error@+1 2 {{expression is not an integral constant expression}} +#pragma omp target teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; @@ -108,9 +111,12 @@ 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}} + // expected-note@+5 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif -#pragma omp target teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'safelen' clause}} expected-error {{expression is not an integral constant expression}} +// expected-error@+3 {{argument to 'safelen' clause must be a strictly positive integer value}} +// expected-error@+2 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'safelen' clause}} +// expected-error@+1 {{expression is not an integral constant expression}} +#pragma omp target teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; Index: clang/test/OpenMP/taskloop_collapse_messages.cpp =================================================================== --- clang/test/OpenMP/taskloop_collapse_messages.cpp +++ clang/test/OpenMP/taskloop_collapse_messages.cpp @@ -39,7 +39,7 @@ #pragma omp taskloop collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp taskloop', but found only 1}} // expected-error@+6 2 {{directive '#pragma omp taskloop' cannot contain more than one 'collapse' clause}} - // expected-error@+5 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+5 {{argument to 'collapse' clause must be a strictly positive integer value}} // expected-error@+4 2 {{expression is not an integral constant expression}} #if __cplusplus >= 201103L // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} @@ -86,7 +86,7 @@ // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+2 2 {{directive '#pragma omp taskloop' cannot contain more than one 'collapse' clause}} - // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}} #pragma omp taskloop collapse (foobool(argc)), collapse (true), collapse (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp taskloop collapse (S1) // expected-error {{'S1' does not refer to a value}} Index: clang/test/OpenMP/taskloop_simd_collapse_messages.cpp =================================================================== --- clang/test/OpenMP/taskloop_simd_collapse_messages.cpp +++ clang/test/OpenMP/taskloop_simd_collapse_messages.cpp @@ -39,7 +39,7 @@ #pragma omp taskloop simd collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}} for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp taskloop simd', but found only 1}} // expected-error@+6 2 {{directive '#pragma omp taskloop simd' cannot contain more than one 'collapse' clause}} - // expected-error@+5 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+5 {{argument to 'collapse' clause must be a strictly positive integer value}} // expected-error@+4 2 {{expression is not an integral constant expression}} #if __cplusplus >= 201103L // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} @@ -86,7 +86,7 @@ // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+2 2 {{directive '#pragma omp taskloop simd' cannot contain more than one 'collapse' clause}} - // expected-error@+1 2 {{argument to 'collapse' clause must be a strictly positive integer value}} + // expected-error@+1 {{argument to 'collapse' clause must be a strictly positive integer value}} #pragma omp taskloop simd collapse (foobool(argc)), collapse (true), collapse (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp taskloop simd collapse (S1) // expected-error {{'S1' does not refer to a value}} Index: clang/test/OpenMP/taskloop_simd_safelen_messages.cpp =================================================================== --- clang/test/OpenMP/taskloop_simd_safelen_messages.cpp +++ clang/test/OpenMP/taskloop_simd_safelen_messages.cpp @@ -39,7 +39,7 @@ #pragma omp taskloop simd safelen ((ST > 0) ? 1 + ST : 2) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+6 2 {{directive '#pragma omp taskloop simd' cannot contain more than one 'safelen' clause}} - // expected-error@+5 2 {{argument to 'safelen' clause must be a strictly positive integer value}} + // expected-error@+5 {{argument to 'safelen' clause must be a strictly positive integer value}} // expected-error@+4 2 {{expression is not an integral constant expression}} #if __cplusplus >= 201103L // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} @@ -84,7 +84,7 @@ // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+2 2 {{directive '#pragma omp taskloop simd' cannot contain more than one 'safelen' clause}} - // expected-error@+1 2 {{argument to 'safelen' clause must be a strictly positive integer value}} + // expected-error@+1 {{argument to 'safelen' clause must be a strictly positive integer value}} #pragma omp taskloop simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp taskloop simd safelen (S1) // expected-error {{'S1' does not refer to a value}} Index: clang/test/OpenMP/taskloop_simd_simdlen_messages.cpp =================================================================== --- clang/test/OpenMP/taskloop_simd_simdlen_messages.cpp +++ clang/test/OpenMP/taskloop_simd_simdlen_messages.cpp @@ -39,7 +39,7 @@ #pragma omp taskloop simd simdlen ((ST > 0) ? 1 + ST : 2) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error@+6 2 {{directive '#pragma omp taskloop simd' cannot contain more than one 'simdlen' clause}} - // expected-error@+5 2 {{argument to 'simdlen' clause must be a strictly positive integer value}} + // expected-error@+5 {{argument to 'simdlen' clause must be a strictly positive integer value}} // expected-error@+4 2 {{expression is not an integral constant expression}} #if __cplusplus >= 201103L // expected-note@+2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} @@ -84,7 +84,7 @@ // expected-note@+4 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif // expected-error@+2 2 {{directive '#pragma omp taskloop simd' cannot contain more than one 'simdlen' clause}} - // expected-error@+1 2 {{argument to 'simdlen' clause must be a strictly positive integer value}} + // expected-error@+1 {{argument to 'simdlen' clause must be a strictly positive integer value}} #pragma omp taskloop simd simdlen (foobool(argc)), simdlen (true), simdlen (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; #pragma omp taskloop simd simdlen (S1) // expected-error {{'S1' does not refer to a value}} Index: clang/test/OpenMP/teams_distribute_collapse_messages.cpp =================================================================== --- clang/test/OpenMP/teams_distribute_collapse_messages.cpp +++ clang/test/OpenMP/teams_distribute_collapse_messages.cpp @@ -63,7 +63,7 @@ // expected-note@+6 2 {{non-constexpr function 'foobool' cannot be used}} #endif // expected-error@+4 2 {{directive '#pragma omp teams distribute' cannot contain more than one 'collapse' clause}} -// expected-error@+3 2 {{argument to 'collapse' clause must be a strictly positive integer value}} +// expected-error@+3 {{argument to 'collapse' clause must be a strictly positive integer value}} // expected-error@+2 2 {{expression is not an integral constant expression}} #pragma omp target #pragma omp teams distribute collapse (foobool(argc)), collapse (true), collapse (-5) @@ -140,7 +140,7 @@ #endif // expected-error@+4 {{expression is not an integral constant expression}} // expected-error@+3 2 {{directive '#pragma omp teams distribute' cannot contain more than one 'collapse' clause}} -// expected-error@+2 2 {{argument to 'collapse' clause must be a strictly positive integer value}} +// expected-error@+2 {{argument to 'collapse' clause must be a strictly positive integer value}} #pragma omp target #pragma omp teams distribute collapse (foobool(argc)), collapse (true), collapse (-5) for (int i = 4; i < 12; i++) Index: clang/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp =================================================================== --- clang/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp +++ clang/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp @@ -63,7 +63,7 @@ // expected-note@+6 2 {{non-constexpr function 'foobool' cannot be used}} #endif // expected-error@+4 2 {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'collapse' clause}} -// expected-error@+3 2 {{argument to 'collapse' clause must be a strictly positive integer value}} +// expected-error@+3 {{argument to 'collapse' clause must be a strictly positive integer value}} // expected-error@+2 2 {{expression is not an integral constant expression}} #pragma omp target #pragma omp teams distribute parallel for collapse (foobool(argc)), collapse (true), collapse (-5) @@ -139,7 +139,7 @@ #endif // expected-error@+4 {{expression is not an integral constant expression}} // expected-error@+3 2 {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'collapse' clause}} -// expected-error@+2 2 {{argument to 'collapse' clause must be a strictly positive integer value}} +// expected-error@+2 {{argument to 'collapse' clause must be a strictly positive integer value}} #pragma omp target #pragma omp teams distribute parallel for collapse (foobool(argc)), collapse (true), collapse (-5) for (int i = 4; i < 12; i++) Index: clang/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp =================================================================== --- clang/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp +++ clang/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp @@ -63,7 +63,7 @@ // expected-note@+6 2 {{non-constexpr function 'foobool' cannot be used}} #endif // expected-error@+4 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'collapse' clause}} -// expected-error@+3 2 {{argument to 'collapse' clause must be a strictly positive integer value}} +// expected-error@+3 {{argument to 'collapse' clause must be a strictly positive integer value}} // expected-error@+2 2 {{expression is not an integral constant expression}} #pragma omp target #pragma omp teams distribute parallel for simd collapse (foobool(argc)), collapse (true), collapse (-5) @@ -139,7 +139,7 @@ #endif // expected-error@+4 {{expression is not an integral constant expression}} // expected-error@+3 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'collapse' clause}} -// expected-error@+2 2 {{argument to 'collapse' clause must be a strictly positive integer value}} +// expected-error@+2 {{argument to 'collapse' clause must be a strictly positive integer value}} #pragma omp target #pragma omp teams distribute parallel for simd collapse (foobool(argc)), collapse (true), collapse (-5) for (int i = 4; i < 12; i++) Index: clang/test/OpenMP/teams_distribute_parallel_for_simd_safelen_messages.cpp =================================================================== --- clang/test/OpenMP/teams_distribute_parallel_for_simd_safelen_messages.cpp +++ clang/test/OpenMP/teams_distribute_parallel_for_simd_safelen_messages.cpp @@ -56,10 +56,13 @@ argv[0][i] = argv[0][i] - argv[0][i-ST]; #if __cplusplus >= 201103L - // expected-note@+3 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} + // expected-note@+6 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif #pragma omp target -#pragma omp teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'safelen' clause}} expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{expression is not an integral constant expression}} +// expected-error@+3 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'safelen' clause}} +// expected-error@+2 {{argument to 'safelen' clause must be a strictly positive integer value}} +// expected-error@+1 2 {{expression is not an integral constant expression}} +#pragma omp teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; @@ -126,10 +129,13 @@ argv[0][i] = argv[0][i] - argv[0][i-4]; #if __cplusplus >= 201103L - // expected-note@+3 {{non-constexpr function 'foobool' cannot be used in a constant expression}} + // expected-note@+6 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif #pragma omp target -#pragma omp teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'safelen' clause}} expected-error {{expression is not an integral constant expression}} +// expected-error@+3 {{argument to 'safelen' clause must be a strictly positive integer value}} +// expected-error@+2 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'safelen' clause}} +// expected-error@+1 {{expression is not an integral constant expression}} +#pragma omp teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; Index: clang/test/OpenMP/teams_distribute_parallel_for_simd_simdlen_messages.cpp =================================================================== --- clang/test/OpenMP/teams_distribute_parallel_for_simd_simdlen_messages.cpp +++ clang/test/OpenMP/teams_distribute_parallel_for_simd_simdlen_messages.cpp @@ -56,10 +56,13 @@ argv[0][i] = argv[0][i] - argv[0][i-ST]; #if __cplusplus >= 201103L - // expected-note@+3 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} + // expected-note@+6 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif #pragma omp target -#pragma omp teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'safelen' clause}} expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{expression is not an integral constant expression}} +// expected-error@+3 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'safelen' clause}} +// expected-error@+2 {{argument to 'safelen' clause must be a strictly positive integer value}} +// expected-error@+1 2 {{expression is not an integral constant expression}} +#pragma omp teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; @@ -126,10 +129,13 @@ argv[0][i] = argv[0][i] - argv[0][i-4]; #if __cplusplus >= 201103L - // expected-note@+3 {{non-constexpr function 'foobool' cannot be used in a constant expression}} + // expected-note@+6 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif #pragma omp target -#pragma omp teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'safelen' clause}} expected-error {{expression is not an integral constant expression}} +// expected-error@+3 {{argument to 'safelen' clause must be a strictly positive integer value}} +// expected-error@+2 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'safelen' clause}} +// expected-error@+1 {{expression is not an integral constant expression}} +#pragma omp teams distribute parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; Index: clang/test/OpenMP/teams_distribute_simd_collapse_messages.cpp =================================================================== --- clang/test/OpenMP/teams_distribute_simd_collapse_messages.cpp +++ clang/test/OpenMP/teams_distribute_simd_collapse_messages.cpp @@ -60,7 +60,7 @@ argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp teams distribute simd', but found only 1}} // expected-error@+7 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'collapse' clause}} -// expected-error@+6 2 {{argument to 'collapse' clause must be a strictly positive integer value}} +// expected-error@+6 {{argument to 'collapse' clause must be a strictly positive integer value}} // expected-error@+5 2 {{expression is not an integral constant expression}} #if __cplusplus >= 201103L // expected-note@+3 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} @@ -136,7 +136,7 @@ // expected-error@+7 {{expression is not an integral constant expression}} // expected-error@+6 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'collapse' clause}} -// expected-error@+5 2 {{argument to 'collapse' clause must be a strictly positive integer value}} +// expected-error@+5 {{argument to 'collapse' clause must be a strictly positive integer value}} #if __cplusplus >= 201103L // expected-note@+3 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif Index: clang/test/OpenMP/teams_distribute_simd_safelen_messages.cpp =================================================================== --- clang/test/OpenMP/teams_distribute_simd_safelen_messages.cpp +++ clang/test/OpenMP/teams_distribute_simd_safelen_messages.cpp @@ -56,10 +56,13 @@ argv[0][i] = argv[0][i] - argv[0][i-ST]; #if __cplusplus >= 201103L - // expected-note@+3 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} + // expected-note@+6 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif #pragma omp target -#pragma omp teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'safelen' clause}} expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{expression is not an integral constant expression}} +// expected-error@+3 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'safelen' clause}} +// expected-error@+2 {{argument to 'safelen' clause must be a strictly positive integer value}} +// expected-error@+1 2 {{expression is not an integral constant expression}} +#pragma omp teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; @@ -126,10 +129,13 @@ argv[0][i] = argv[0][i] - argv[0][i-4]; #if __cplusplus >= 201103L - // expected-note@+3 {{non-constexpr function 'foobool' cannot be used in a constant expression}} + // expected-note@+6 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif #pragma omp target -#pragma omp teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'safelen' clause}} expected-error {{expression is not an integral constant expression}} +// expected-error@+3 {{argument to 'safelen' clause must be a strictly positive integer value}} +// expected-error@+2 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'safelen' clause}} +// expected-error@+1 {{expression is not an integral constant expression}} +#pragma omp teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; Index: clang/test/OpenMP/teams_distribute_simd_simdlen_messages.cpp =================================================================== --- clang/test/OpenMP/teams_distribute_simd_simdlen_messages.cpp +++ clang/test/OpenMP/teams_distribute_simd_simdlen_messages.cpp @@ -56,10 +56,13 @@ argv[0][i] = argv[0][i] - argv[0][i-ST]; #if __cplusplus >= 201103L - // expected-note@+3 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} + // expected-note@+6 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif #pragma omp target -#pragma omp teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'safelen' clause}} expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{expression is not an integral constant expression}} +// expected-error@+3 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'safelen' clause}} +// expected-error@+2 {{argument to 'safelen' clause must be a strictly positive integer value}} +// expected-error@+1 2 {{expression is not an integral constant expression}} +#pragma omp teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; @@ -126,10 +129,13 @@ argv[0][i] = argv[0][i] - argv[0][i-4]; #if __cplusplus >= 201103L - // expected-note@+3 {{non-constexpr function 'foobool' cannot be used in a constant expression}} + // expected-note@+6 {{non-constexpr function 'foobool' cannot be used in a constant expression}} #endif #pragma omp target -#pragma omp teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) // expected-error 2 {{argument to 'safelen' clause must be a strictly positive integer value}} expected-error 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'safelen' clause}} expected-error {{expression is not an integral constant expression}} +// expected-error@+3 {{argument to 'safelen' clause must be a strictly positive integer value}} +// expected-error@+2 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'safelen' clause}} +// expected-error@+1 {{expression is not an integral constant expression}} +#pragma omp teams distribute simd safelen (foobool(argc)), safelen (true), safelen (-5) for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; Index: llvm/include/llvm/ADT/APSInt.h =================================================================== --- llvm/include/llvm/ADT/APSInt.h +++ llvm/include/llvm/ADT/APSInt.h @@ -42,6 +42,24 @@ /// \param Str the string to be interpreted. explicit APSInt(StringRef Str); + /// Determine sign of this APSInt. + /// + /// \returns true if this APSInt is negative, false otherwise + bool isNegative() const { return isSigned() && APInt::isNegative(); } + + /// Determine if this APSInt Value is non-negative (>= 0) + /// + /// \returns true if this APSInt is non-negative, false otherwise + bool isNonNegative() const { return !isNegative(); } + + /// Determine if this APSInt Value is positive. + /// + /// This tests if the value of this APSInt is positive (> 0). Note + /// that 0 is not a positive value. + /// + /// \returns true if this APSInt is positive. + bool isStrictlyPositive() const { return isNonNegative() && !isNullValue(); } + APSInt &operator=(APInt RHS) { // Retain our current sign. APInt::operator=(std::move(RHS)); Index: llvm/unittests/ADT/APSIntTest.cpp =================================================================== --- llvm/unittests/ADT/APSIntTest.cpp +++ llvm/unittests/ADT/APSIntTest.cpp @@ -159,4 +159,90 @@ #endif +TEST(APSIntTest, SignedHighBit) { + APSInt False(APInt(1, 0), false); + APSInt True(APInt(1, 1), false); + APSInt CharMin(APInt(8, 0), false); + APSInt CharSmall(APInt(8, 0x13), false); + APSInt CharBoundaryUnder(APInt(8, 0x7f), false); + APSInt CharBoundaryOver(APInt(8, 0x80), false); + APSInt CharLarge(APInt(8, 0xd9), false); + APSInt CharMax(APInt(8, 0xff), false); + + EXPECT_FALSE(False.isNegative()); + EXPECT_TRUE(False.isNonNegative()); + EXPECT_FALSE(False.isStrictlyPositive()); + + EXPECT_TRUE(True.isNegative()); + EXPECT_FALSE(True.isNonNegative()); + EXPECT_FALSE(True.isStrictlyPositive()); + + EXPECT_FALSE(CharMin.isNegative()); + EXPECT_TRUE(CharMin.isNonNegative()); + EXPECT_FALSE(CharMin.isStrictlyPositive()); + + EXPECT_FALSE(CharSmall.isNegative()); + EXPECT_TRUE(CharSmall.isNonNegative()); + EXPECT_TRUE(CharSmall.isStrictlyPositive()); + + EXPECT_FALSE(CharBoundaryUnder.isNegative()); + EXPECT_TRUE(CharBoundaryUnder.isNonNegative()); + EXPECT_TRUE(CharBoundaryUnder.isStrictlyPositive()); + + EXPECT_TRUE(CharBoundaryOver.isNegative()); + EXPECT_FALSE(CharBoundaryOver.isNonNegative()); + EXPECT_FALSE(CharBoundaryOver.isStrictlyPositive()); + + EXPECT_TRUE(CharLarge.isNegative()); + EXPECT_FALSE(CharLarge.isNonNegative()); + EXPECT_FALSE(CharLarge.isStrictlyPositive()); + + EXPECT_TRUE(CharMax.isNegative()); + EXPECT_FALSE(CharMax.isNonNegative()); + EXPECT_FALSE(CharMax.isStrictlyPositive()); +} + +TEST(APSIntTest, UnsignedHighBit) { + APSInt False(APInt(1, 0)); + APSInt True(APInt(1, 1)); + APSInt CharMin(APInt(8, 0)); + APSInt CharSmall(APInt(8, 0x13)); + APSInt CharBoundaryUnder(APInt(8, 0x7f)); + APSInt CharBoundaryOver(APInt(8, 0x80)); + APSInt CharLarge(APInt(8, 0xd9)); + APSInt CharMax(APInt(8, 0xff)); + + EXPECT_FALSE(False.isNegative()); + EXPECT_TRUE(False.isNonNegative()); + EXPECT_FALSE(False.isStrictlyPositive()); + + EXPECT_FALSE(True.isNegative()); + EXPECT_TRUE(True.isNonNegative()); + EXPECT_TRUE(True.isStrictlyPositive()); + + EXPECT_FALSE(CharMin.isNegative()); + EXPECT_TRUE(CharMin.isNonNegative()); + EXPECT_FALSE(CharMin.isStrictlyPositive()); + + EXPECT_FALSE(CharSmall.isNegative()); + EXPECT_TRUE(CharSmall.isNonNegative()); + EXPECT_TRUE(CharSmall.isStrictlyPositive()); + + EXPECT_FALSE(CharBoundaryUnder.isNegative()); + EXPECT_TRUE(CharBoundaryUnder.isNonNegative()); + EXPECT_TRUE(CharBoundaryUnder.isStrictlyPositive()); + + EXPECT_FALSE(CharBoundaryOver.isNegative()); + EXPECT_TRUE(CharBoundaryOver.isNonNegative()); + EXPECT_TRUE(CharBoundaryOver.isStrictlyPositive()); + + EXPECT_FALSE(CharLarge.isNegative()); + EXPECT_TRUE(CharLarge.isNonNegative()); + EXPECT_TRUE(CharLarge.isStrictlyPositive()); + + EXPECT_FALSE(CharMax.isNegative()); + EXPECT_TRUE(CharMax.isNonNegative()); + EXPECT_TRUE(CharMax.isStrictlyPositive()); +} + } // end anonymous namespace