[clang] ebf6fd6 - Make OpenMP tests less brittle in the face of changes in constant
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 5 19:04:30 PDT 2020
Author: Richard Smith
Date: 2020-10-05T19:04:14-07:00
New Revision: ebf6fd633ef83b747bac721aafc3677d2c47aef1
URL: https://github.com/llvm/llvm-project/commit/ebf6fd633ef83b747bac721aafc3677d2c47aef1
DIFF: https://github.com/llvm/llvm-project/commit/ebf6fd633ef83b747bac721aafc3677d2c47aef1.diff
LOG: Make OpenMP tests less brittle in the face of changes in constant
evaluation diagnostics.
Added:
Modified:
clang/test/OpenMP/distribute_collapse_messages.cpp
clang/test/OpenMP/distribute_parallel_for_collapse_messages.cpp
clang/test/OpenMP/distribute_parallel_for_simd_collapse_messages.cpp
clang/test/OpenMP/distribute_parallel_for_simd_safelen_messages.cpp
clang/test/OpenMP/distribute_parallel_for_simd_simdlen_messages.cpp
clang/test/OpenMP/distribute_simd_collapse_messages.cpp
clang/test/OpenMP/distribute_simd_safelen_messages.cpp
clang/test/OpenMP/distribute_simd_simdlen_messages.cpp
clang/test/OpenMP/for_collapse_messages.cpp
clang/test/OpenMP/for_ordered_clause.cpp
clang/test/OpenMP/for_simd_collapse_messages.cpp
clang/test/OpenMP/for_simd_safelen_messages.cpp
clang/test/OpenMP/for_simd_simdlen_messages.cpp
clang/test/OpenMP/master_taskloop_collapse_messages.cpp
clang/test/OpenMP/master_taskloop_simd_collapse_messages.cpp
clang/test/OpenMP/master_taskloop_simd_safelen_messages.cpp
clang/test/OpenMP/master_taskloop_simd_simdlen_messages.cpp
clang/test/OpenMP/parallel_for_collapse_messages.cpp
clang/test/OpenMP/parallel_for_ordered_messages.cpp
clang/test/OpenMP/parallel_for_simd_collapse_messages.cpp
clang/test/OpenMP/parallel_for_simd_safelen_messages.cpp
clang/test/OpenMP/parallel_for_simd_simdlen_messages.cpp
clang/test/OpenMP/parallel_master_taskloop_collapse_messages.cpp
clang/test/OpenMP/parallel_master_taskloop_simd_collapse_messages.cpp
clang/test/OpenMP/parallel_master_taskloop_simd_safelen_messages.cpp
clang/test/OpenMP/parallel_master_taskloop_simd_simdlen_messages.cpp
clang/test/OpenMP/simd_collapse_messages.cpp
clang/test/OpenMP/simd_safelen_messages.cpp
clang/test/OpenMP/simd_simdlen_messages.cpp
clang/test/OpenMP/target_parallel_for_collapse_messages.cpp
clang/test/OpenMP/target_parallel_for_ordered_messages.cpp
clang/test/OpenMP/target_parallel_for_simd_collapse_messages.cpp
clang/test/OpenMP/target_parallel_for_simd_ordered_messages.cpp
clang/test/OpenMP/target_parallel_for_simd_safelen_messages.cpp
clang/test/OpenMP/target_parallel_for_simd_simdlen_messages.cpp
clang/test/OpenMP/target_simd_collapse_messages.cpp
clang/test/OpenMP/target_simd_safelen_messages.cpp
clang/test/OpenMP/target_simd_simdlen_messages.cpp
clang/test/OpenMP/target_teams_distribute_collapse_messages.cpp
clang/test/OpenMP/target_teams_distribute_parallel_for_collapse_messages.cpp
clang/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_messages.cpp
clang/test/OpenMP/target_teams_distribute_parallel_for_simd_safelen_messages.cpp
clang/test/OpenMP/target_teams_distribute_parallel_for_simd_simdlen_messages.cpp
clang/test/OpenMP/target_teams_distribute_simd_collapse_messages.cpp
clang/test/OpenMP/target_teams_distribute_simd_safelen_messages.cpp
clang/test/OpenMP/target_teams_distribute_simd_simdlen_messages.cpp
clang/test/OpenMP/taskloop_collapse_messages.cpp
clang/test/OpenMP/taskloop_simd_collapse_messages.cpp
clang/test/OpenMP/taskloop_simd_safelen_messages.cpp
clang/test/OpenMP/taskloop_simd_simdlen_messages.cpp
clang/test/OpenMP/teams_distribute_collapse_messages.cpp
clang/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp
clang/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp
clang/test/OpenMP/teams_distribute_parallel_for_simd_safelen_messages.cpp
clang/test/OpenMP/teams_distribute_parallel_for_simd_simdlen_messages.cpp
clang/test/OpenMP/teams_distribute_simd_collapse_messages.cpp
clang/test/OpenMP/teams_distribute_simd_safelen_messages.cpp
clang/test/OpenMP/teams_distribute_simd_simdlen_messages.cpp
Removed:
################################################################################
diff --git a/clang/test/OpenMP/distribute_collapse_messages.cpp b/clang/test/OpenMP/distribute_collapse_messages.cpp
index 6a0c8c31cd97..c14b7da71549 100644
--- a/clang/test/OpenMP/distribute_collapse_messages.cpp
+++ b/clang/test/OpenMP/distribute_collapse_messages.cpp
@@ -6,29 +6,27 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
- // expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp distribute collapse // expected-error {{expected '(' after 'collapse'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp distribute collapse ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp distribute collapse () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp distribute collapse (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
@@ -38,18 +36,16 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp distribute 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', but found only 1}}
-#if __cplusplus >= 201103L
- // expected-note at +5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+
// expected-error at +3 2 {{directive '#pragma omp distribute' cannot contain more than one 'collapse' clause}}
// expected-error at +2 {{argument to 'collapse' clause must be a strictly positive integer value}}
- // expected-error at +1 2 {{integral constant expression}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{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];
#pragma omp distribute collapse (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -75,15 +71,11 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp distribute', but found only 1}}
#pragma omp distribute collapse (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp distribute' are ignored}} expected-note {{as specified in 'collapse' clause}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp distribute', but found only 1}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
- #pragma omp distribute collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}}
+
+ #pragma omp distribute collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}} expected-note 0+{{constant expression}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +5 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
- // expected-error at +3 {{integral constant expression}}
+
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp distribute' cannot contain more than one 'collapse' clause}}
// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp distribute collapse (foobool(argc)), collapse (true), collapse (-5)
@@ -91,7 +83,7 @@ int main(int argc, char **argv) {
#pragma omp distribute collapse (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/distribute_parallel_for_collapse_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_collapse_messages.cpp
index 3883575e68bc..2d9e4fcf532b 100644
--- a/clang/test/OpenMP/distribute_parallel_for_collapse_messages.cpp
+++ b/clang/test/OpenMP/distribute_parallel_for_collapse_messages.cpp
@@ -6,20 +6,19 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for collapse // expected-error {{expected '(' after 'collapse'}}
@@ -34,9 +33,8 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target
#pragma omp teams
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp distribute parallel for collapse (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target
@@ -52,12 +50,9 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
#pragma omp teams
#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 at +8 2 {{directive '#pragma omp distribute parallel for' cannot contain more than one 'collapse' clause}}
- // expected-error at +7 {{argument to 'collapse' clause must be a strictly positive integer value}}
- // expected-error at +6 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +5 2 {{directive '#pragma omp distribute parallel for' cannot contain more than one 'collapse' clause}}
+ // expected-error at +4 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error at +3 2 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for collapse (foobool(argc)), collapse (true), collapse (-5)
@@ -67,7 +62,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
#pragma omp distribute parallel for collapse (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +6 2 {{integral constant expression}}
+ // expected-error at +6 2 {{integral constant expression}} expected-note at +6 0+{{constant expression}}
#else
// expected-error at +4 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -111,18 +106,12 @@ int main(int argc, char **argv) {
#pragma omp teams
#pragma omp distribute parallel for collapse (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for' are ignored}} expected-note {{as specified in 'collapse' clause}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp distribute parallel for', but found only 1}}
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for collapse (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +8 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +6{{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +5 {{integral constant expression}} expected-note at +5 0+{{constant expression}}
// expected-error at +4 2 {{directive '#pragma omp distribute parallel for' cannot contain more than one 'collapse' clause}}
// expected-error at +3 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp target
@@ -134,7 +123,7 @@ int main(int argc, char **argv) {
#pragma omp distribute parallel for collapse (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +6 {{integral constant expression}}
+ // expected-error at +6 {{integral constant expression}} expected-note at +6 0+{{constant expression}}
#else
// expected-error at +4 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_collapse_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_collapse_messages.cpp
index ff9a728ee2de..d58c6f2831a9 100644
--- a/clang/test/OpenMP/distribute_parallel_for_simd_collapse_messages.cpp
+++ b/clang/test/OpenMP/distribute_parallel_for_simd_collapse_messages.cpp
@@ -6,20 +6,19 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for simd collapse // expected-error {{expected '(' after 'collapse'}}
@@ -34,9 +33,8 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target
#pragma omp teams
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp distribute parallel for simd collapse (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target
@@ -52,12 +50,9 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
#pragma omp teams
#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 at +8 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'collapse' clause}}
- // expected-error at +7 {{argument to 'collapse' clause must be a strictly positive integer value}}
- // expected-error at +6 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +5 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'collapse' clause}}
+ // expected-error at +4 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error at +3 2 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for simd collapse (foobool(argc)), collapse (true), collapse (-5)
@@ -67,7 +62,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
#pragma omp distribute parallel for simd collapse (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +6 2 {{integral constant expression}}
+ // expected-error at +6 2 {{integral constant expression}} expected-note at +6 0+{{constant expression}}
#else
// expected-error at +4 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -111,18 +106,12 @@ int main(int argc, char **argv) {
#pragma omp teams
#pragma omp distribute parallel for simd collapse (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp distribute parallel for simd' are ignored}} expected-note {{as specified in 'collapse' clause}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp distribute parallel for simd', but found only 1}}
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for simd collapse (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +8 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +6{{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +5 {{integral constant expression}} expected-note at +5 0+{{constant expression}}
// expected-error at +4 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'collapse' clause}}
// expected-error at +3 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp target
@@ -134,7 +123,7 @@ int main(int argc, char **argv) {
#pragma omp distribute parallel for simd collapse (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +6 {{integral constant expression}}
+ // expected-error at +6 {{integral constant expression}} expected-note at +6 0+{{constant expression}}
#else
// expected-error at +4 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_safelen_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_safelen_messages.cpp
index 2d659efadbbd..eba65f733fcf 100644
--- a/clang/test/OpenMP/distribute_parallel_for_simd_safelen_messages.cpp
+++ b/clang/test/OpenMP/distribute_parallel_for_simd_safelen_messages.cpp
@@ -6,20 +6,19 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target
#pragma omp teams
@@ -40,7 +39,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
#pragma omp target
#pragma omp teams
-#pragma omp distribute parallel for simd safelen (argc // expected-note {{to match this '('}} expected-error 2 {{integral constant expression}} expected-note 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} expected-error {{expected ')'}}
+#pragma omp distribute parallel for simd safelen (argc // expected-note {{to match this '('}} expected-error 2 {{integral constant expression}} expected-note 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} expected-note 0+{{constant expression}} expected-error {{expected ')'}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -62,14 +61,11 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
-#if __cplusplus >= 201103L
- // expected-note at +7 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
#pragma omp target
#pragma omp teams
// expected-error at +3 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'safelen' clause}}
// expected-error at +2 {{argument to 'safelen' clause must be a strictly positive integer value}}
-// expected-error at +1 2 {{integral constant expression}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{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];
@@ -81,7 +77,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +6 2 {{integral constant expression}}
+ // expected-error at +6 2 {{integral constant expression}} expected-note at +6 0+{{constant expression}}
#else
// expected-error at +4 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -137,23 +133,18 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +4 {{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(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}}
+#pragma omp parallel for simd safelen (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}} expected-note 0+{{constant expression}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +7 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
#pragma omp target
#pragma omp teams
// expected-error at +3 {{argument to 'safelen' clause must be a strictly positive integer value}}
// expected-error at +2 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'safelen' clause}}
-// expected-error at +1 {{integral constant expression}}
+// expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{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];
@@ -165,7 +156,7 @@ int main(int argc, char **argv) {
argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +6 {{integral constant expression}}
+ // expected-error at +6 {{integral constant expression}} expected-note at +6 0+{{constant expression}}
#else
// expected-error at +4 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/distribute_parallel_for_simd_simdlen_messages.cpp b/clang/test/OpenMP/distribute_parallel_for_simd_simdlen_messages.cpp
index b4f40e8e5c23..e035f16b60b4 100644
--- a/clang/test/OpenMP/distribute_parallel_for_simd_simdlen_messages.cpp
+++ b/clang/test/OpenMP/distribute_parallel_for_simd_simdlen_messages.cpp
@@ -5,20 +5,19 @@
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for simd simdlen // expected-error {{expected '(' after 'simdlen'}}
@@ -37,9 +36,8 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
-// expected-error at +5 {{expected ')'}} expected-note at +5 {{to match this '('}}
-// expected-error at +4 2 {{integral constant expression}}
-// expected-note at +3 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+// expected-error at +4 {{expected ')'}} expected-note at +4 {{to match this '('}}
+// expected-error at +3 2 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
#pragma omp target
#pragma omp teams
#pragma omp distribute parallel for simd simdlen (argc
@@ -65,14 +63,11 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
-#if __cplusplus >= 201103L
- // expected-note at +7 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
#pragma omp target
#pragma omp teams
// expected-error at +3 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'simdlen' clause}}
// expected-error at +2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
-// expected-error at +1 2 {{integral constant expression}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{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];
@@ -84,7 +79,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +6 2 {{integral constant expression}}
+ // expected-error at +6 2 {{integral constant expression}} expected-note at +6 0+{{constant expression}}
#else
// expected-error at +4 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -140,22 +135,15 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +4 {{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(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}}
+#pragma omp distribute parallel for simd simdlen (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}} expected-note 0+{{constant expression}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-
-#if __cplusplus >= 201103L
- // expected-note at +7 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
#pragma omp target
#pragma omp teams
-// expected-error at +3 {{integral constant expression}}
+// expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp distribute parallel for simd' cannot contain more than one 'simdlen' clause}}
// expected-error at +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)
@@ -169,7 +157,7 @@ int main(int argc, char **argv) {
argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +6 {{integral constant expression}}
+ // expected-error at +6 {{integral constant expression}} expected-note at +6 0+{{constant expression}}
#else
// expected-error at +4 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/distribute_simd_collapse_messages.cpp b/clang/test/OpenMP/distribute_simd_collapse_messages.cpp
index 418094bc1a7b..98b02ed814fd 100644
--- a/clang/test/OpenMP/distribute_simd_collapse_messages.cpp
+++ b/clang/test/OpenMP/distribute_simd_collapse_messages.cpp
@@ -6,20 +6,19 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target
#pragma omp teams
#pragma omp distribute simd collapse // expected-error {{expected '(' after 'collapse'}}
@@ -34,9 +33,8 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target
#pragma omp teams
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp distribute simd collapse (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target
@@ -52,12 +50,9 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
#pragma omp teams
#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 at +8 2 {{directive '#pragma omp distribute simd' cannot contain more than one 'collapse' clause}}
- // expected-error at +7 {{argument to 'collapse' clause must be a strictly positive integer value}}
- // expected-error at +6 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +5 2 {{directive '#pragma omp distribute simd' cannot contain more than one 'collapse' clause}}
+ // expected-error at +4 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error at +3 2 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
#pragma omp target
#pragma omp teams
#pragma omp distribute simd collapse (foobool(argc)), collapse (true), collapse (-5)
@@ -67,7 +62,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
#pragma omp distribute simd collapse (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +6 2 {{integral constant expression}}
+ // expected-error at +6 2 {{integral constant expression}} expected-note at +6 0+{{constant expression}}
#else
// expected-error at +4 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -111,18 +106,12 @@ int main(int argc, char **argv) {
#pragma omp teams
#pragma omp distribute simd collapse (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp distribute simd' are ignored}} expected-note {{as specified in 'collapse' clause}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp distribute simd', but found only 1}}
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
#pragma omp target
#pragma omp teams
#pragma omp distribute simd collapse (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +8 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +6{{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +5 {{integral constant expression}} expected-note at +5 0+{{constant expression}}
// expected-error at +4 2 {{directive '#pragma omp distribute simd' cannot contain more than one 'collapse' clause}}
// expected-error at +3 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp target
@@ -134,7 +123,7 @@ int main(int argc, char **argv) {
#pragma omp distribute simd collapse (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +6 {{integral constant expression}}
+ // expected-error at +6 {{integral constant expression}} expected-note at +6 0+{{constant expression}}
#else
// expected-error at +4 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/distribute_simd_safelen_messages.cpp b/clang/test/OpenMP/distribute_simd_safelen_messages.cpp
index bffc8ec85469..51d677829486 100644
--- a/clang/test/OpenMP/distribute_simd_safelen_messages.cpp
+++ b/clang/test/OpenMP/distribute_simd_safelen_messages.cpp
@@ -6,20 +6,19 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target
#pragma omp teams
@@ -40,7 +39,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
#pragma omp target
#pragma omp teams
-#pragma omp distribute simd safelen (argc // expected-note {{to match this '('}} expected-error 2 {{integral constant expression}} expected-note 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} expected-error {{expected ')'}}
+#pragma omp distribute simd safelen (argc // expected-note {{to match this '('}} expected-error 2 {{integral constant expression}} expected-note 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} expected-note 0+{{constant expression}} expected-error {{expected ')'}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -62,14 +61,11 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
-#if __cplusplus >= 201103L
- // expected-note at +7 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
#pragma omp target
#pragma omp teams
// expected-error at +3 2 {{directive '#pragma omp distribute simd' cannot contain more than one 'safelen' clause}}
// expected-error at +2 {{argument to 'safelen' clause must be a strictly positive integer value}}
-// expected-error at +1 2 {{integral constant expression}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{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];
@@ -81,7 +77,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +6 2 {{integral constant expression}}
+ // expected-error at +6 2 {{integral constant expression}} expected-note at +6 0+{{constant expression}}
#else
// expected-error at +4 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -137,23 +133,18 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +4 {{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(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}}
+#pragma omp parallel for simd safelen (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}} expected-note 0+{{constant expression}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +7 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
#pragma omp target
#pragma omp teams
// expected-error at +3 {{argument to 'safelen' clause must be a strictly positive integer value}}
// expected-error at +2 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'safelen' clause}}
-// expected-error at +1 {{integral constant expression}}
+// expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{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];
@@ -165,7 +156,7 @@ int main(int argc, char **argv) {
argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +6 {{integral constant expression}}
+ // expected-error at +6 {{integral constant expression}} expected-note at +6 0+{{constant expression}}
#else
// expected-error at +4 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/distribute_simd_simdlen_messages.cpp b/clang/test/OpenMP/distribute_simd_simdlen_messages.cpp
index bffc8ec85469..51d677829486 100644
--- a/clang/test/OpenMP/distribute_simd_simdlen_messages.cpp
+++ b/clang/test/OpenMP/distribute_simd_simdlen_messages.cpp
@@ -6,20 +6,19 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target
#pragma omp teams
@@ -40,7 +39,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
#pragma omp target
#pragma omp teams
-#pragma omp distribute simd safelen (argc // expected-note {{to match this '('}} expected-error 2 {{integral constant expression}} expected-note 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} expected-error {{expected ')'}}
+#pragma omp distribute simd safelen (argc // expected-note {{to match this '('}} expected-error 2 {{integral constant expression}} expected-note 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} expected-note 0+{{constant expression}} expected-error {{expected ')'}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -62,14 +61,11 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
-#if __cplusplus >= 201103L
- // expected-note at +7 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
#pragma omp target
#pragma omp teams
// expected-error at +3 2 {{directive '#pragma omp distribute simd' cannot contain more than one 'safelen' clause}}
// expected-error at +2 {{argument to 'safelen' clause must be a strictly positive integer value}}
-// expected-error at +1 2 {{integral constant expression}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{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];
@@ -81,7 +77,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +6 2 {{integral constant expression}}
+ // expected-error at +6 2 {{integral constant expression}} expected-note at +6 0+{{constant expression}}
#else
// expected-error at +4 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -137,23 +133,18 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +4 {{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(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}}
+#pragma omp parallel for simd safelen (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}} expected-note 0+{{constant expression}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +7 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
#pragma omp target
#pragma omp teams
// expected-error at +3 {{argument to 'safelen' clause must be a strictly positive integer value}}
// expected-error at +2 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'safelen' clause}}
-// expected-error at +1 {{integral constant expression}}
+// expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{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];
@@ -165,7 +156,7 @@ int main(int argc, char **argv) {
argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +6 {{integral constant expression}}
+ // expected-error at +6 {{integral constant expression}} expected-note at +6 0+{{constant expression}}
#else
// expected-error at +4 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/for_collapse_messages.cpp b/clang/test/OpenMP/for_collapse_messages.cpp
index 07974be8da96..07630ffaaed9 100644
--- a/clang/test/OpenMP/for_collapse_messages.cpp
+++ b/clang/test/OpenMP/for_collapse_messages.cpp
@@ -12,29 +12,27 @@
// RUN: %clang_cc1 -verify=expected,omp50 -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify=expected,omp50 -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp for collapse // expected-error {{expected '(' after 'collapse'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for collapse ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for collapse () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp for collapse (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
@@ -44,18 +42,15 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp 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 at +6 2 {{directive '#pragma omp for' cannot contain more than one 'collapse' clause}}
- // expected-error at +5 {{argument to 'collapse' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp for' cannot contain more than one 'collapse' clause}}
+ // expected-error at +2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp for collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for collapse (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -81,16 +76,10 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp for', but found only 1}}
#pragma omp for collapse (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}} expected-note {{as specified in 'collapse' clause}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp for', but found only 1}}
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp for collapse (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp for' cannot contain more than one 'collapse' clause}}
// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp for collapse (foobool(argc)), collapse (true), collapse (-5)
@@ -98,7 +87,7 @@ int main(int argc, char **argv) {
#pragma omp for collapse (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/for_ordered_clause.cpp b/clang/test/OpenMP/for_ordered_clause.cpp
index 537e52b60511..d9dbb828f645 100644
--- a/clang/test/OpenMP/for_ordered_clause.cpp
+++ b/clang/test/OpenMP/for_ordered_clause.cpp
@@ -5,22 +5,21 @@
// RUN: %clang_cc1 -verify -fopenmp-simd %s
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s
+
+// expected-note@* 0+{{declared here}}
// SIMD-ONLY0-NOT: {{__kmpc|__tgt}}
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp for ordered
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
@@ -30,9 +29,8 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}
#pragma omp for ordered() // expected-error {{expected expression}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
-// expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
-// expected-error at +2 2 {{integral constant expression}}
-// expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+// expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp for ordered(argc
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
@@ -46,12 +44,9 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}
#pragma omp for ordered((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'ordered' 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 at +6 2 {{directive '#pragma omp for' cannot contain more than one 'ordered' clause}}
-// expected-error at +5 {{argument to 'ordered' clause must be a strictly positive integer value}}
-// expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
-// expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+// expected-error at +3 2 {{directive '#pragma omp for' cannot contain more than one 'ordered' clause}}
+// expected-error at +2 {{argument to 'ordered' clause must be a strictly positive integer value}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp for ordered(foobool(argc)), ordered(true), ordered(-5)
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
@@ -59,7 +54,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
#if __cplusplus <= 199711L
-// expected-error at +4 2 {{integral constant expression}}
+// expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -101,17 +96,11 @@ int main(int argc, char **argv) {
#pragma omp for ordered(2 + 2)) // expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}} expected-note {{as specified in 'ordered' clause}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i - 4]; // expected-error {{expected 4 for loops after '#pragma omp for', but found only 1}}
-// expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
-// expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+// expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp for ordered(foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i - 4];
-// expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
-// expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+// expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp for' cannot contain more than one 'ordered' clause}}
// expected-error at +1 {{argument to 'ordered' clause must be a strictly positive integer value}}
#pragma omp for ordered(foobool(argc)), ordered(true), ordered(-5)
@@ -121,7 +110,7 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i - 4];
#if __cplusplus <= 199711L
-// expected-error at +4 {{integral constant expression}}
+// expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/for_simd_collapse_messages.cpp b/clang/test/OpenMP/for_simd_collapse_messages.cpp
index efd9d39e4719..d9f8a2d97151 100644
--- a/clang/test/OpenMP/for_simd_collapse_messages.cpp
+++ b/clang/test/OpenMP/for_simd_collapse_messages.cpp
@@ -6,29 +6,27 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp for simd collapse // expected-error {{expected '(' after 'collapse'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for simd collapse ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for simd collapse () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp for simd collapse (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
@@ -38,18 +36,15 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp 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 at +6 2 {{directive '#pragma omp for simd' cannot contain more than one 'collapse' clause}}
- // expected-error at +5 {{argument to 'collapse' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp for simd' cannot contain more than one 'collapse' clause}}
+ // expected-error at +2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp 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];
#pragma omp for simd collapse (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -75,16 +70,10 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp for simd', but found only 1}}
#pragma omp for simd collapse (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp for simd' are ignored}} expected-note {{as specified in 'collapse' clause}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp for simd', but found only 1}}
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp for simd collapse (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp for simd' cannot contain more than one 'collapse' clause}}
// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp for simd collapse (foobool(argc)), collapse (true), collapse (-5)
@@ -92,7 +81,7 @@ int main(int argc, char **argv) {
#pragma omp for simd collapse (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/for_simd_safelen_messages.cpp b/clang/test/OpenMP/for_simd_safelen_messages.cpp
index f7142972d0a9..aaade5d181ad 100644
--- a/clang/test/OpenMP/for_simd_safelen_messages.cpp
+++ b/clang/test/OpenMP/for_simd_safelen_messages.cpp
@@ -6,29 +6,27 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp for simd safelen // expected-error {{expected '(' after 'safelen'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for simd safelen ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for simd safelen () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp for simd safelen (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
@@ -38,18 +36,15 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp 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 at +6 2 {{directive '#pragma omp for simd' cannot contain more than one 'safelen' clause}}
- // expected-error at +5 {{argument to 'safelen' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp for simd' cannot contain more than one 'safelen' clause}}
+ // expected-error at +2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp 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];
#pragma omp for simd safelen (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -73,16 +68,10 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp for simd safelen (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp for simd' are ignored}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp for simd safelen (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp for simd' cannot contain more than one 'safelen' clause}}
// expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp for simd safelen (foobool(argc)), safelen (true), safelen (-5)
@@ -90,7 +79,7 @@ int main(int argc, char **argv) {
#pragma omp for simd safelen (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/for_simd_simdlen_messages.cpp b/clang/test/OpenMP/for_simd_simdlen_messages.cpp
index eb0455e618f1..fa270abb9d56 100644
--- a/clang/test/OpenMP/for_simd_simdlen_messages.cpp
+++ b/clang/test/OpenMP/for_simd_simdlen_messages.cpp
@@ -6,29 +6,27 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp for simd simdlen // expected-error {{expected '(' after 'simdlen'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for simd simdlen ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp for simd simdlen () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp for simd simdlen (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
@@ -38,18 +36,15 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp 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 at +6 2 {{directive '#pragma omp for simd' cannot contain more than one 'simdlen' clause}}
- // expected-error at +5 {{argument to 'simdlen' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp for simd' cannot contain more than one 'simdlen' clause}}
+ // expected-error at +2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp 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];
#pragma omp for simd simdlen (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -73,16 +68,10 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp for simd simdlen (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp for simd' are ignored}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp for simd simdlen (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp for simd' cannot contain more than one 'simdlen' clause}}
// expected-error at +1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp for simd simdlen (foobool(argc)), simdlen (true), simdlen (-5)
@@ -90,7 +79,7 @@ int main(int argc, char **argv) {
#pragma omp for simd simdlen (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/master_taskloop_collapse_messages.cpp b/clang/test/OpenMP/master_taskloop_collapse_messages.cpp
index 99cc4263ebb7..b6a20ee7382a 100644
--- a/clang/test/OpenMP/master_taskloop_collapse_messages.cpp
+++ b/clang/test/OpenMP/master_taskloop_collapse_messages.cpp
@@ -6,29 +6,27 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp master taskloop collapse // expected-error {{expected '(' after 'collapse'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp master taskloop collapse ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp master taskloop collapse () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp master taskloop collapse (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
@@ -38,18 +36,15 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp master 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 master taskloop', but found only 1}}
- // expected-error at +6 2 {{directive '#pragma omp master taskloop' cannot contain more than one 'collapse' clause}}
- // expected-error at +5 {{argument to 'collapse' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp master taskloop' cannot contain more than one 'collapse' clause}}
+ // expected-error at +2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp master taskloop collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp master taskloop collapse (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -75,16 +70,10 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp master taskloop', but found only 1}}
#pragma omp master taskloop collapse (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp master taskloop' are ignored}} expected-note {{as specified in 'collapse' clause}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp master taskloop', but found only 1}}
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp master taskloop collapse (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp master taskloop' cannot contain more than one 'collapse' clause}}
// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp master taskloop collapse (foobool(argc)), collapse (true), collapse (-5)
@@ -92,7 +81,7 @@ int main(int argc, char **argv) {
#pragma omp master taskloop collapse (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/master_taskloop_simd_collapse_messages.cpp b/clang/test/OpenMP/master_taskloop_simd_collapse_messages.cpp
index 787c50aade7b..74d68bb34117 100644
--- a/clang/test/OpenMP/master_taskloop_simd_collapse_messages.cpp
+++ b/clang/test/OpenMP/master_taskloop_simd_collapse_messages.cpp
@@ -6,29 +6,27 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp master taskloop simd collapse // expected-error {{expected '(' after 'collapse'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp master taskloop simd collapse ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp master taskloop simd collapse () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp master taskloop simd collapse (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
@@ -38,18 +36,15 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp master 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 master taskloop simd', but found only 1}}
- // expected-error at +6 2 {{directive '#pragma omp master taskloop simd' cannot contain more than one 'collapse' clause}}
- // expected-error at +5 {{argument to 'collapse' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp master taskloop simd' cannot contain more than one 'collapse' clause}}
+ // expected-error at +2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp master taskloop 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];
#pragma omp master taskloop simd collapse (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -75,16 +70,10 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp master taskloop simd', but found only 1}}
#pragma omp master taskloop simd collapse (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp master taskloop simd' are ignored}} expected-note {{as specified in 'collapse' clause}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp master taskloop simd', but found only 1}}
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp master taskloop simd collapse (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp master taskloop simd' cannot contain more than one 'collapse' clause}}
// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp master taskloop simd collapse (foobool(argc)), collapse (true), collapse (-5)
@@ -92,7 +81,7 @@ int main(int argc, char **argv) {
#pragma omp master taskloop simd collapse (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/master_taskloop_simd_safelen_messages.cpp b/clang/test/OpenMP/master_taskloop_simd_safelen_messages.cpp
index 9420cde08365..b92f463b4401 100644
--- a/clang/test/OpenMP/master_taskloop_simd_safelen_messages.cpp
+++ b/clang/test/OpenMP/master_taskloop_simd_safelen_messages.cpp
@@ -6,29 +6,27 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp master taskloop simd safelen // expected-error {{expected '(' after 'safelen'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp master taskloop simd safelen ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp master taskloop simd safelen () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp master taskloop simd safelen (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
@@ -38,18 +36,15 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp master 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 at +6 2 {{directive '#pragma omp master taskloop simd' cannot contain more than one 'safelen' clause}}
- // expected-error at +5 {{argument to 'safelen' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp master taskloop simd' cannot contain more than one 'safelen' clause}}
+ // expected-error at +2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp master taskloop 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];
#pragma omp master taskloop simd safelen (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -73,16 +68,10 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp master taskloop simd safelen (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp master taskloop simd' are ignored}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp master taskloop simd safelen (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp master taskloop simd' cannot contain more than one 'safelen' clause}}
// expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp master taskloop simd safelen (foobool(argc)), safelen (true), safelen (-5)
@@ -90,7 +79,7 @@ int main(int argc, char **argv) {
#pragma omp master taskloop simd safelen (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/master_taskloop_simd_simdlen_messages.cpp b/clang/test/OpenMP/master_taskloop_simd_simdlen_messages.cpp
index 36abee7b5cfe..5fc0b163ec85 100644
--- a/clang/test/OpenMP/master_taskloop_simd_simdlen_messages.cpp
+++ b/clang/test/OpenMP/master_taskloop_simd_simdlen_messages.cpp
@@ -6,29 +6,27 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp master taskloop simd simdlen // expected-error {{expected '(' after 'simdlen'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp master taskloop simd simdlen ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp master taskloop simd simdlen () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp master taskloop simd simdlen (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
@@ -38,18 +36,15 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp master 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 at +6 2 {{directive '#pragma omp master taskloop simd' cannot contain more than one 'simdlen' clause}}
- // expected-error at +5 {{argument to 'simdlen' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp master taskloop simd' cannot contain more than one 'simdlen' clause}}
+ // expected-error at +2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp master taskloop 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];
#pragma omp master taskloop simd simdlen (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -73,16 +68,10 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp master taskloop simd simdlen (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp master taskloop simd' are ignored}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp master taskloop simd simdlen (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp master taskloop simd' cannot contain more than one 'simdlen' clause}}
// expected-error at +1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp master taskloop simd simdlen (foobool(argc)), simdlen (true), simdlen (-5)
@@ -90,7 +79,7 @@ int main(int argc, char **argv) {
#pragma omp master taskloop simd simdlen (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/parallel_for_collapse_messages.cpp b/clang/test/OpenMP/parallel_for_collapse_messages.cpp
index ba48ce50178a..5ad5628e9719 100644
--- a/clang/test/OpenMP/parallel_for_collapse_messages.cpp
+++ b/clang/test/OpenMP/parallel_for_collapse_messages.cpp
@@ -6,29 +6,27 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp parallel for collapse // expected-error {{expected '(' after 'collapse'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for collapse ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for collapse () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp parallel for collapse (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
@@ -38,18 +36,15 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp 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 at +6 2 {{directive '#pragma omp parallel for' cannot contain more than one 'collapse' clause}}
- // expected-error at +5 {{argument to 'collapse' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp parallel for' cannot contain more than one 'collapse' clause}}
+ // expected-error at +2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp parallel for collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for collapse (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -75,16 +70,10 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp parallel for', but found only 1}}
#pragma omp parallel for collapse (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}} expected-note {{as specified in 'collapse' clause}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp parallel for', but found only 1}}
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp parallel for collapse (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4{{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp parallel for' cannot contain more than one 'collapse' clause}}
// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp parallel for collapse (foobool(argc)), collapse (true), collapse (-5)
@@ -92,7 +81,7 @@ int main(int argc, char **argv) {
#pragma omp parallel for collapse (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/parallel_for_ordered_messages.cpp b/clang/test/OpenMP/parallel_for_ordered_messages.cpp
index 7b46191fba92..3d6a8f267acb 100644
--- a/clang/test/OpenMP/parallel_for_ordered_messages.cpp
+++ b/clang/test/OpenMP/parallel_for_ordered_messages.cpp
@@ -6,20 +6,19 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp parallel for ordered
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
@@ -29,9 +28,8 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}
#pragma omp parallel for ordered() // expected-error {{expected expression}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
-// expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
-// expected-error at +2 2 {{integral constant expression}}
-// expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+// expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp parallel for ordered(argc
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
@@ -45,12 +43,9 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}
#pragma omp parallel for ordered((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'ordered' 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 at +6 2 {{directive '#pragma omp parallel for' cannot contain more than one 'ordered' clause}}
-// expected-error at +5 {{argument to 'ordered' clause must be a strictly positive integer value}}
-// expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
-// expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+// expected-error at +3 2 {{directive '#pragma omp parallel for' cannot contain more than one 'ordered' clause}}
+// expected-error at +2 {{argument to 'ordered' clause must be a strictly positive integer value}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp parallel for ordered(foobool(argc)), ordered(true), ordered(-5)
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
@@ -58,7 +53,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
#if __cplusplus <= 199711L
-// expected-error at +4 2 {{integral constant expression}}
+// expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -92,17 +87,11 @@ int main(int argc, char **argv) {
#pragma omp parallel for ordered(2 + 2)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}} expected-note {{as specified in 'ordered' clause}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i - 4]; // expected-error {{expected 4 for loops after '#pragma omp parallel for', but found only 1}}
-// expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
-// expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+// expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp parallel for ordered(foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i - 4];
-// expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
-// expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+// expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp parallel for' cannot contain more than one 'ordered' clause}}
// expected-error at +1 {{argument to 'ordered' clause must be a strictly positive integer value}}
#pragma omp parallel for ordered(foobool(argc)), ordered(true), ordered(-5)
@@ -112,7 +101,7 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i - 4];
#if __cplusplus <= 199711L
-// expected-error at +4 {{integral constant expression}}
+// expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/parallel_for_simd_collapse_messages.cpp b/clang/test/OpenMP/parallel_for_simd_collapse_messages.cpp
index f04b1881db3b..7c12ce827a4a 100644
--- a/clang/test/OpenMP/parallel_for_simd_collapse_messages.cpp
+++ b/clang/test/OpenMP/parallel_for_simd_collapse_messages.cpp
@@ -6,29 +6,27 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp parallel for simd collapse // expected-error {{expected '(' after 'collapse'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for simd collapse ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for simd collapse () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp parallel for simd collapse (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
@@ -38,18 +36,15 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp 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 at +6 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'collapse' clause}}
- // expected-error at +5 {{argument to 'collapse' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'collapse' clause}}
+ // expected-error at +2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp 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];
#pragma omp parallel for simd collapse (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -75,16 +70,10 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp parallel for simd', but found only 1}}
#pragma omp parallel for simd collapse (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for simd' are ignored}} expected-note {{as specified in 'collapse' clause}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp parallel for simd', but found only 1}}
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp parallel for simd collapse (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'collapse' clause}}
// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp parallel for simd collapse (foobool(argc)), collapse (true), collapse (-5)
@@ -92,7 +81,7 @@ int main(int argc, char **argv) {
#pragma omp parallel for simd collapse (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/parallel_for_simd_safelen_messages.cpp b/clang/test/OpenMP/parallel_for_simd_safelen_messages.cpp
index 29da9ff27a0b..e4facb1c93f0 100644
--- a/clang/test/OpenMP/parallel_for_simd_safelen_messages.cpp
+++ b/clang/test/OpenMP/parallel_for_simd_safelen_messages.cpp
@@ -6,29 +6,27 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp parallel for simd safelen // expected-error {{expected '(' after 'safelen'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for simd safelen ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for simd safelen () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp parallel for simd safelen (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
@@ -38,18 +36,15 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp 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 at +6 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'safelen' clause}}
- // expected-error at +5 {{argument to 'safelen' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'safelen' clause}}
+ // expected-error at +2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp 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];
#pragma omp parallel for simd safelen (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -73,16 +68,10 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp parallel for simd safelen (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for simd' are ignored}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp parallel for simd safelen (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'safelen' clause}}
// expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp parallel for simd safelen (foobool(argc)), safelen (true), safelen (-5)
@@ -90,7 +79,7 @@ int main(int argc, char **argv) {
#pragma omp parallel for simd safelen (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/parallel_for_simd_simdlen_messages.cpp b/clang/test/OpenMP/parallel_for_simd_simdlen_messages.cpp
index 8e0bf9ce6d7b..3b225ab3e54f 100644
--- a/clang/test/OpenMP/parallel_for_simd_simdlen_messages.cpp
+++ b/clang/test/OpenMP/parallel_for_simd_simdlen_messages.cpp
@@ -6,29 +6,27 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp parallel for simd simdlen // expected-error {{expected '(' after 'simdlen'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for simd simdlen ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel for simd simdlen () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp parallel for simd simdlen (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
@@ -38,18 +36,15 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp 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 at +6 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'simdlen' clause}}
- // expected-error at +5 {{argument to 'simdlen' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'simdlen' clause}}
+ // expected-error at +2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp 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];
#pragma omp parallel for simd simdlen (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -73,16 +68,10 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp parallel for simd simdlen (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for simd' are ignored}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp parallel for simd simdlen (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp parallel for simd' cannot contain more than one 'simdlen' clause}}
// expected-error at +1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp parallel for simd simdlen (foobool(argc)), simdlen (true), simdlen (-5)
@@ -90,7 +79,7 @@ int main(int argc, char **argv) {
#pragma omp parallel for simd simdlen (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/parallel_master_taskloop_collapse_messages.cpp b/clang/test/OpenMP/parallel_master_taskloop_collapse_messages.cpp
index d93222a4b5c7..730627179191 100644
--- a/clang/test/OpenMP/parallel_master_taskloop_collapse_messages.cpp
+++ b/clang/test/OpenMP/parallel_master_taskloop_collapse_messages.cpp
@@ -6,29 +6,27 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp parallel master taskloop collapse // expected-error {{expected '(' after 'collapse'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel master taskloop collapse ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel master taskloop collapse () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp parallel master taskloop collapse (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
@@ -38,18 +36,15 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel master 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 parallel master taskloop', but found only 1}}
- // expected-error at +6 2 {{directive '#pragma omp parallel master taskloop' cannot contain more than one 'collapse' clause}}
- // expected-error at +5 {{argument to 'collapse' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp parallel master taskloop' cannot contain more than one 'collapse' clause}}
+ // expected-error at +2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp parallel master taskloop collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel master taskloop collapse (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -75,16 +70,10 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp parallel master taskloop', but found only 1}}
#pragma omp parallel master taskloop collapse (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp parallel master taskloop' are ignored}} expected-note {{as specified in 'collapse' clause}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp parallel master taskloop', but found only 1}}
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp parallel master taskloop collapse (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp parallel master taskloop' cannot contain more than one 'collapse' clause}}
// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp parallel master taskloop collapse (foobool(argc)), collapse (true), collapse (-5)
@@ -92,7 +81,7 @@ int main(int argc, char **argv) {
#pragma omp parallel master taskloop collapse (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/parallel_master_taskloop_simd_collapse_messages.cpp b/clang/test/OpenMP/parallel_master_taskloop_simd_collapse_messages.cpp
index c97cec72b514..e5b6d01f18b3 100644
--- a/clang/test/OpenMP/parallel_master_taskloop_simd_collapse_messages.cpp
+++ b/clang/test/OpenMP/parallel_master_taskloop_simd_collapse_messages.cpp
@@ -6,29 +6,27 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp parallel master taskloop simd collapse // expected-error {{expected '(' after 'collapse'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel master taskloop simd collapse ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel master taskloop simd collapse () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp parallel master taskloop simd collapse (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
@@ -38,18 +36,15 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel master 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 parallel master taskloop simd', but found only 1}}
- // expected-error at +6 2 {{directive '#pragma omp parallel master taskloop simd' cannot contain more than one 'collapse' clause}}
- // expected-error at +5 {{argument to 'collapse' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp parallel master taskloop simd' cannot contain more than one 'collapse' clause}}
+ // expected-error at +2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp parallel master taskloop 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];
#pragma omp parallel master taskloop simd collapse (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -75,16 +70,10 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp parallel master taskloop simd', but found only 1}}
#pragma omp parallel master taskloop simd collapse (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp parallel master taskloop simd' are ignored}} expected-note {{as specified in 'collapse' clause}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp parallel master taskloop simd', but found only 1}}
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp parallel master taskloop simd collapse (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp parallel master taskloop simd' cannot contain more than one 'collapse' clause}}
// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp parallel master taskloop simd collapse (foobool(argc)), collapse (true), collapse (-5)
@@ -92,7 +81,7 @@ int main(int argc, char **argv) {
#pragma omp parallel master taskloop simd collapse (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/parallel_master_taskloop_simd_safelen_messages.cpp b/clang/test/OpenMP/parallel_master_taskloop_simd_safelen_messages.cpp
index 612a39f63412..94173de545be 100644
--- a/clang/test/OpenMP/parallel_master_taskloop_simd_safelen_messages.cpp
+++ b/clang/test/OpenMP/parallel_master_taskloop_simd_safelen_messages.cpp
@@ -6,29 +6,27 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp parallel master taskloop simd safelen // expected-error {{expected '(' after 'safelen'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel master taskloop simd safelen ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel master taskloop simd safelen () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp parallel master taskloop simd safelen (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
@@ -38,18 +36,15 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel master 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 at +6 2 {{directive '#pragma omp parallel master taskloop simd' cannot contain more than one 'safelen' clause}}
- // expected-error at +5 {{argument to 'safelen' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp parallel master taskloop simd' cannot contain more than one 'safelen' clause}}
+ // expected-error at +2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp parallel master taskloop 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];
#pragma omp parallel master taskloop simd safelen (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -73,16 +68,10 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp parallel master taskloop simd safelen (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp parallel master taskloop simd' are ignored}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp parallel master taskloop simd safelen (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp parallel master taskloop simd' cannot contain more than one 'safelen' clause}}
// expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp parallel master taskloop simd safelen (foobool(argc)), safelen (true), safelen (-5)
@@ -90,7 +79,7 @@ int main(int argc, char **argv) {
#pragma omp parallel master taskloop simd safelen (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/parallel_master_taskloop_simd_simdlen_messages.cpp b/clang/test/OpenMP/parallel_master_taskloop_simd_simdlen_messages.cpp
index 16a543e13ada..447dd8029c99 100644
--- a/clang/test/OpenMP/parallel_master_taskloop_simd_simdlen_messages.cpp
+++ b/clang/test/OpenMP/parallel_master_taskloop_simd_simdlen_messages.cpp
@@ -6,29 +6,27 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp parallel master taskloop simd simdlen // expected-error {{expected '(' after 'simdlen'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel master taskloop simd simdlen ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel master taskloop simd simdlen () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp parallel master taskloop simd simdlen (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
@@ -38,18 +36,15 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp parallel master 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 at +6 2 {{directive '#pragma omp parallel master taskloop simd' cannot contain more than one 'simdlen' clause}}
- // expected-error at +5 {{argument to 'simdlen' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp parallel master taskloop simd' cannot contain more than one 'simdlen' clause}}
+ // expected-error at +2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp parallel master taskloop 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];
#pragma omp parallel master taskloop simd simdlen (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -73,16 +68,10 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp parallel master taskloop simd simdlen (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp parallel master taskloop simd' are ignored}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp parallel master taskloop simd simdlen (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp parallel master taskloop simd' cannot contain more than one 'simdlen' clause}}
// expected-error at +1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp parallel master taskloop simd simdlen (foobool(argc)), simdlen (true), simdlen (-5)
@@ -90,7 +79,7 @@ int main(int argc, char **argv) {
#pragma omp parallel master taskloop simd simdlen (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/simd_collapse_messages.cpp b/clang/test/OpenMP/simd_collapse_messages.cpp
index 37915743b129..1ce3bef3535c 100644
--- a/clang/test/OpenMP/simd_collapse_messages.cpp
+++ b/clang/test/OpenMP/simd_collapse_messages.cpp
@@ -6,29 +6,27 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp simd collapse // expected-error {{expected '(' after 'collapse'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp simd collapse ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp simd collapse () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp simd collapse (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
@@ -38,18 +36,15 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp 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 at +6 2 {{directive '#pragma omp simd' cannot contain more than one 'collapse' clause}}
- // expected-error at +5 {{argument to 'collapse' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp simd' cannot contain more than one 'collapse' clause}}
+ // expected-error at +2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp 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];
#pragma omp simd collapse (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -75,16 +70,10 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp simd', but found only 1}}
#pragma omp simd collapse (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp simd' are ignored}} expected-note {{as specified in 'collapse' clause}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp simd', but found only 1}}
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp simd collapse (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp simd' cannot contain more than one 'collapse' clause}}
// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp simd collapse (foobool(argc)), collapse (true), collapse (-5)
@@ -92,7 +81,7 @@ int main(int argc, char **argv) {
#pragma omp simd collapse (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/simd_safelen_messages.cpp b/clang/test/OpenMP/simd_safelen_messages.cpp
index 2cc5a8848448..426953403746 100644
--- a/clang/test/OpenMP/simd_safelen_messages.cpp
+++ b/clang/test/OpenMP/simd_safelen_messages.cpp
@@ -6,29 +6,27 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp simd safelen // expected-error {{expected '(' after 'safelen'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp simd safelen ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp simd safelen () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp simd safelen (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
@@ -38,18 +36,15 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp 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 at +6 2 {{directive '#pragma omp simd' cannot contain more than one 'safelen' clause}}
- // expected-error at +5 {{argument to 'safelen' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp simd' cannot contain more than one 'safelen' clause}}
+ // expected-error at +2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp 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];
#pragma omp simd safelen (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -73,16 +68,10 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp simd safelen (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp simd' are ignored}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp simd safelen (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp simd' cannot contain more than one 'safelen' clause}}
// expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp simd safelen (foobool(argc)), safelen (true), safelen (-5)
@@ -90,7 +79,7 @@ int main(int argc, char **argv) {
#pragma omp simd safelen (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/simd_simdlen_messages.cpp b/clang/test/OpenMP/simd_simdlen_messages.cpp
index d7f86e05f3a1..11dafdab9d96 100644
--- a/clang/test/OpenMP/simd_simdlen_messages.cpp
+++ b/clang/test/OpenMP/simd_simdlen_messages.cpp
@@ -6,29 +6,27 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp simd simdlen // expected-error {{expected '(' after 'simdlen'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp simd simdlen ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp simd simdlen () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp simd simdlen (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
@@ -38,18 +36,15 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp 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 at +6 2 {{directive '#pragma omp simd' cannot contain more than one 'simdlen' clause}}
- // expected-error at +5 {{argument to 'simdlen' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp simd' cannot contain more than one 'simdlen' clause}}
+ // expected-error at +2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp 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];
#pragma omp simd simdlen (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -73,16 +68,10 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp simd simdlen (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp simd' are ignored}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp simd simdlen (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp simd' cannot contain more than one 'simdlen' clause}}
// expected-error at +1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp simd simdlen (foobool(argc)), simdlen (true), simdlen (-5)
@@ -90,7 +79,7 @@ int main(int argc, char **argv) {
#pragma omp simd simdlen (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/target_parallel_for_collapse_messages.cpp b/clang/test/OpenMP/target_parallel_for_collapse_messages.cpp
index 0ee442cd443b..d359d4e90d1d 100644
--- a/clang/test/OpenMP/target_parallel_for_collapse_messages.cpp
+++ b/clang/test/OpenMP/target_parallel_for_collapse_messages.cpp
@@ -6,29 +6,28 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
bool foobool(int argc) {
-#if __cplusplus >= 201103L
-// expected-note at -2 4 {{declared here}}
-#endif
+
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target parallel for collapse // expected-error {{expected '(' after 'collapse'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target parallel for collapse ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target parallel for collapse () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target parallel for collapse (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
@@ -40,18 +39,16 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp target parallel for', but found only 1}}
// expected-error at +3 2 {{directive '#pragma omp target parallel for' cannot contain more than one 'collapse' clause}}
// expected-error at +2 {{argument to 'collapse' clause must be a strictly positive integer value}}
- // expected-error at +1 2 {{integral constant expression}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target parallel for collapse (foobool(argc)), collapse (true), collapse (-5)
-#if __cplusplus >= 201103L
-// expected-note at -2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target parallel for collapse (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus >= 201103L
// expected-error at +4 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#else
- // expected-error at +2 2 {{integral constant expression}}
+ // expected-error at +2 2 {{integral constant expression}} expected-note at +2 0+{{constant expression}}
#endif
#pragma omp target parallel for collapse (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -75,25 +72,21 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp target parallel for', but found only 1}}
#pragma omp target parallel for collapse (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}} expected-note {{as specified in 'collapse' clause}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp target parallel for', but found only 1}}
- #pragma omp target parallel for collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}}
-#if __cplusplus >= 201103L
-// expected-note at -2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ #pragma omp target parallel for collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}} expected-note 0+{{constant expression}}
+
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +3 {{integral constant expression}}
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp target parallel for' cannot contain more than one 'collapse' clause}}
// expected-error at +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 at -2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp target parallel for collapse (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus >= 201103L
// expected-error at +4 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#else
- // expected-error at +2 {{integral constant expression}}
+ // expected-error at +2 {{integral constant expression}} expected-note at +2 0+{{constant expression}}
#endif
#pragma omp target parallel for collapse (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
diff --git a/clang/test/OpenMP/target_parallel_for_ordered_messages.cpp b/clang/test/OpenMP/target_parallel_for_ordered_messages.cpp
index 8396273d65d3..188d9441d8c9 100644
--- a/clang/test/OpenMP/target_parallel_for_ordered_messages.cpp
+++ b/clang/test/OpenMP/target_parallel_for_ordered_messages.cpp
@@ -6,20 +6,20 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
bool foobool(int argc) {
-#if __cplusplus >= 201103L
-// expected-note at -2 4 {{declared here}}
-#endif
+
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target parallel for ordered
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
@@ -29,9 +29,8 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}
#pragma omp target parallel for ordered() // expected-error {{expected expression}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
-// expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
-// expected-error at +2 2 {{integral constant expression}}
-// expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+// expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target parallel for ordered(argc
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
@@ -45,12 +44,10 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}
#pragma omp target parallel for ordered((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'ordered' 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}}
-#if __cplusplus >= 201103L
-// expected-note at +5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+
// expected-error at +3 2 {{directive '#pragma omp target parallel for' cannot contain more than one 'ordered' clause}}
// expected-error at +2 {{argument to 'ordered' clause must be a strictly positive integer value}}
-// expected-error at +1 2 {{integral constant expression}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target parallel for ordered(foobool(argc)), ordered(true), ordered(-5)
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
@@ -60,7 +57,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}
#if __cplusplus >= 201103L
// expected-error at +4 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#else
- // expected-error at +2 2 {{integral constant expression}}
+ // expected-error at +2 2 {{integral constant expression}} expected-note at +2 0+{{constant expression}}
#endif
#pragma omp target parallel for ordered(argv[1] = 2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++)
@@ -92,16 +89,12 @@ int main(int argc, char **argv) {
#pragma omp target parallel for ordered(2 + 2)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for' are ignored}} expected-note {{as specified in 'ordered' clause}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i - 4]; // expected-error {{expected 4 for loops after '#pragma omp target parallel for', but found only 1}}
-#if __cplusplus >= 201103L
-// expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
-#pragma omp target parallel for ordered(foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}}
+
+#pragma omp target parallel for ordered(foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}} expected-note 0+{{constant expression}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i - 4];
-#if __cplusplus >= 201103L
-// expected-note at +5 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
-// expected-error at +3 {{integral constant expression}}
+
+// expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp target parallel for' cannot contain more than one 'ordered' clause}}
// expected-error at +1 {{argument to 'ordered' clause must be a strictly positive integer value}}
#pragma omp target parallel for ordered(foobool(argc)), ordered(true), ordered(-5)
@@ -113,7 +106,7 @@ int main(int argc, char **argv) {
#if __cplusplus >= 201103L
// expected-error at +4 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#else
- // expected-error at +2 {{integral constant expression}}
+ // expected-error at +2 {{integral constant expression}} expected-note at +2 0+{{constant expression}}
#endif
#pragma omp target parallel for ordered(argv[1] = 2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = 4; i < 12; i++)
diff --git a/clang/test/OpenMP/target_parallel_for_simd_collapse_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_collapse_messages.cpp
index 309ba48e73fd..7acb2587f976 100644
--- a/clang/test/OpenMP/target_parallel_for_simd_collapse_messages.cpp
+++ b/clang/test/OpenMP/target_parallel_for_simd_collapse_messages.cpp
@@ -6,30 +6,28 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
- // expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
- int j; // expected-note {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
+ int j;
#pragma omp target parallel for simd collapse // expected-error {{expected '(' after 'collapse'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target parallel for simd collapse ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target parallel for simd collapse () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target parallel for simd collapse (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
@@ -39,18 +37,16 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target 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 target parallel for simd', but found only 1}}
-#if __cplusplus >= 201103L
- // expected-note at +5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+
// expected-error at +3 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'collapse' clause}}
// expected-error at +2 {{argument to 'collapse' clause must be a strictly positive integer value}}
- // expected-error at +1 2 {{integral constant expression}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{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];
#pragma omp target parallel for simd collapse (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-note at +2 {{read of non-const variable 'j' is not allowed in a constant expression}}
- // expected-error at +1 {{integral constant expression}}
+
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target parallel for simd collapse (j=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target parallel for simd collapse (1)
@@ -63,7 +59,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
}
int main(int argc, char **argv) {
- int j; // expected-note {{declared here}}
+ int j;
#pragma omp target parallel for simd collapse // expected-error {{expected '(' after 'collapse'}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp target parallel for simd collapse ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -75,22 +71,20 @@ int main(int argc, char **argv) {
#pragma omp target parallel for simd collapse (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}} expected-note {{as specified in 'collapse' clause}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp target parallel for simd', but found only 1}}
#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
+
#endif
- #pragma omp target parallel for simd collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}}
+ #pragma omp target parallel for simd collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}} expected-note 0+{{constant expression}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +5 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
- // expected-error at +3 {{integral constant expression}}
+
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'collapse' clause}}
// expected-error at +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}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-note at +2 {{read of non-const variable 'j' is not allowed in a constant expression}}
- // expected-error at +1 {{integral constant expression}}
+
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target parallel for simd collapse (j=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-error at +3 {{statement after '#pragma omp target parallel for simd' must be a for loop}}
diff --git a/clang/test/OpenMP/target_parallel_for_simd_ordered_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_ordered_messages.cpp
index ed3e06541978..8dd7f68c25fd 100644
--- a/clang/test/OpenMP/target_parallel_for_simd_ordered_messages.cpp
+++ b/clang/test/OpenMP/target_parallel_for_simd_ordered_messages.cpp
@@ -6,21 +6,20 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
+template <class T, typename S, int N, int ST>
T tmain(T argc, S **argv) {
- int j; // expected-note {{declared here}}
+ int j;
#pragma omp target parallel for simd ordered
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
@@ -56,8 +55,8 @@ T tmain(T argc, S **argv) {
#pragma omp target parallel for simd ordered(S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
-// expected-note at +2 {{read of non-const variable 'j' is not allowed in a constant expression}}
-// expected-error at +1 {{integral constant expression}}
+
+// expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target parallel for simd ordered(j = 2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i - ST];
@@ -76,7 +75,7 @@ T tmain(T argc, S **argv) {
}
int main(int argc, char **argv) {
- int j; // expected-note {{declared here}}
+ int j;
#pragma omp target parallel for simd ordered
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i - 4];
@@ -94,16 +93,12 @@ int main(int argc, char **argv) {
#pragma omp target parallel for simd ordered(2 + 2)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i - 4];
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
-#pragma omp target parallel for simd ordered(foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}}
+
+#pragma omp target parallel for simd ordered(foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}} expected-note 0+{{constant expression}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i - 4];
-#if __cplusplus >= 201103L
- // expected-note at +5 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
-// expected-error at +3 {{integral constant expression}}
+
+// expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'ordered' clause}}
// expected-error at +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)
@@ -112,8 +107,8 @@ int main(int argc, char **argv) {
#pragma omp target parallel for simd ordered(S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i - 4];
-// expected-note at +2 {{read of non-const variable 'j' is not allowed in a constant expression}}
-// expected-error at +1 {{integral constant expression}}
+
+// expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target parallel for simd ordered(j = 2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i - 4];
diff --git a/clang/test/OpenMP/target_parallel_for_simd_safelen_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_safelen_messages.cpp
index f3d4104deda4..ef47d78caf54 100644
--- a/clang/test/OpenMP/target_parallel_for_simd_safelen_messages.cpp
+++ b/clang/test/OpenMP/target_parallel_for_simd_safelen_messages.cpp
@@ -6,29 +6,27 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target parallel for simd safelen // expected-error {{expected '(' after 'safelen'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target parallel for simd safelen ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target parallel for simd safelen () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target parallel for simd safelen (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
@@ -38,18 +36,15 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target 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 at +6 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'safelen' clause}}
- // expected-error at +5 {{argument to 'safelen' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'safelen' clause}}
+ // expected-error at +2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target 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];
#pragma omp target parallel for simd safelen (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -73,16 +68,10 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp target parallel for simd safelen (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target parallel for simd safelen (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'safelen' clause}}
// expected-error at +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)
@@ -90,7 +79,7 @@ int main(int argc, char **argv) {
#pragma omp target parallel for simd safelen (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/target_parallel_for_simd_simdlen_messages.cpp b/clang/test/OpenMP/target_parallel_for_simd_simdlen_messages.cpp
index 9d17d54ded7d..7bf27e9dd942 100644
--- a/clang/test/OpenMP/target_parallel_for_simd_simdlen_messages.cpp
+++ b/clang/test/OpenMP/target_parallel_for_simd_simdlen_messages.cpp
@@ -6,20 +6,19 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target parallel for simd simdlen // expected-error {{expected '(' after 'simdlen'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -29,9 +28,8 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
#pragma omp target parallel for simd simdlen () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
-// expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
-// expected-error at +2 2 {{integral constant expression}}
-// expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+// expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target parallel for simd simdlen (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -45,12 +43,9 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
#pragma omp target 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 at +6 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'simdlen' clause}}
- // expected-error at +5 {{argument to 'simdlen' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'simdlen' clause}}
+ // expected-error at +2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target 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];
@@ -58,7 +53,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -99,17 +94,11 @@ int main(int argc, char **argv) {
#pragma omp target parallel for simd simdlen (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp target parallel for simd' are ignored}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target parallel for simd simdlen (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp target parallel for simd' cannot contain more than one 'simdlen' clause}}
// expected-error at +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)
@@ -119,7 +108,7 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/target_simd_collapse_messages.cpp b/clang/test/OpenMP/target_simd_collapse_messages.cpp
index 0040816c60c1..00fa3c85279f 100644
--- a/clang/test/OpenMP/target_simd_collapse_messages.cpp
+++ b/clang/test/OpenMP/target_simd_collapse_messages.cpp
@@ -4,30 +4,28 @@
// RUN: %clang_cc1 -verify -fopenmp-simd %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
- int j; // expected-note {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
+ int j;
#pragma omp target simd collapse // expected-error {{expected '(' after 'collapse'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target simd collapse ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target simd collapse () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target simd collapse (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
@@ -37,18 +35,16 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target 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 target simd', but found only 1}}
-#if __cplusplus >= 201103L
- // expected-note at +5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+
// expected-error at +3 2 {{directive '#pragma omp target simd' cannot contain more than one 'collapse' clause}}
// expected-error at +2 {{argument to 'collapse' clause must be a strictly positive integer value}}
- // expected-error at +1 2 {{integral constant expression}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{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];
#pragma omp target simd collapse (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-note at +2 {{read of non-const variable 'j' is not allowed in a constant expression}}
- // expected-error at +1 {{integral constant expression}}
+
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target simd collapse (j=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target simd collapse (1)
@@ -61,7 +57,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
}
int main(int argc, char **argv) {
- int j; // expected-note {{declared here}}
+ int j;
#pragma omp target simd collapse // expected-error {{expected '(' after 'collapse'}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp target simd collapse ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -72,23 +68,19 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp target simd', but found only 1}}
#pragma omp target simd collapse (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp target simd' are ignored}} expected-note {{as specified in 'collapse' clause}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp target simd', but found only 1}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
- #pragma omp target simd collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}}
+
+ #pragma omp target simd collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}} expected-note 0+{{constant expression}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +5 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
- // expected-error at +3 {{integral constant expression}}
+
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp target simd' cannot contain more than one 'collapse' clause}}
// expected-error at +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}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-note at +2 {{read of non-const variable 'j' is not allowed in a constant expression}}
- // expected-error at +1 {{integral constant expression}}
+
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target simd collapse (j=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
// expected-error at +3 {{statement after '#pragma omp target simd' must be a for loop}}
diff --git a/clang/test/OpenMP/target_simd_safelen_messages.cpp b/clang/test/OpenMP/target_simd_safelen_messages.cpp
index b64af78f72a2..926cb9f56d51 100644
--- a/clang/test/OpenMP/target_simd_safelen_messages.cpp
+++ b/clang/test/OpenMP/target_simd_safelen_messages.cpp
@@ -6,29 +6,27 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target simd safelen // expected-error {{expected '(' after 'safelen'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target simd safelen ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target simd safelen () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target simd safelen (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
@@ -38,18 +36,15 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target 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 at +6 2 {{directive '#pragma omp target simd' cannot contain more than one 'safelen' clause}}
- // expected-error at +5 {{argument to 'safelen' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp target simd' cannot contain more than one 'safelen' clause}}
+ // expected-error at +2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target 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];
#pragma omp target simd safelen (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -73,16 +68,10 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp target simd safelen (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp target simd' are ignored}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target simd safelen (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp target simd' cannot contain more than one 'safelen' clause}}
// expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp target simd safelen (foobool(argc)), safelen (true), safelen (-5)
@@ -90,7 +79,7 @@ int main(int argc, char **argv) {
#pragma omp target simd safelen (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/target_simd_simdlen_messages.cpp b/clang/test/OpenMP/target_simd_simdlen_messages.cpp
index 30e8a31069e6..595f88fd351d 100644
--- a/clang/test/OpenMP/target_simd_simdlen_messages.cpp
+++ b/clang/test/OpenMP/target_simd_simdlen_messages.cpp
@@ -6,20 +6,19 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target simd simdlen // expected-error {{expected '(' after 'simdlen'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -29,9 +28,8 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
#pragma omp target simd simdlen () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
-// expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
-// expected-error at +2 2 {{integral constant expression}}
-// expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+// expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target simd simdlen (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -45,12 +43,9 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
#pragma omp target 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 at +6 2 {{directive '#pragma omp target simd' cannot contain more than one 'simdlen' clause}}
- // expected-error at +5 {{argument to 'simdlen' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp target simd' cannot contain more than one 'simdlen' clause}}
+ // expected-error at +2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target 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];
@@ -58,7 +53,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -99,17 +94,11 @@ int main(int argc, char **argv) {
#pragma omp target simd simdlen (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp target simd' are ignored}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target simd simdlen (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp target simd' cannot contain more than one 'simdlen' clause}}
// expected-error at +1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp target simd simdlen (foobool(argc)), simdlen (true), simdlen (-5)
@@ -119,7 +108,7 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/target_teams_distribute_collapse_messages.cpp b/clang/test/OpenMP/target_teams_distribute_collapse_messages.cpp
index 550f644b3f2f..ef22b5f268d2 100644
--- a/clang/test/OpenMP/target_teams_distribute_collapse_messages.cpp
+++ b/clang/test/OpenMP/target_teams_distribute_collapse_messages.cpp
@@ -6,20 +6,19 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target teams distribute collapse // expected-error {{expected '(' after 'collapse'}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -32,9 +31,8 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
-// expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
-// expected-error at +2 2 {{integral constant expression}}
-// expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+// expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target teams distribute collapse (argc
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -52,12 +50,9 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp target teams distribute', but found only 1}}
-#if __cplusplus >= 201103L
-// expected-note at +5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
// expected-error at +3 2 {{directive '#pragma omp target teams distribute' cannot contain more than one 'collapse' clause}}
// expected-error at +2 {{argument to 'collapse' clause must be a strictly positive integer value}}
-// expected-error at +1 2 {{integral constant expression}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target teams 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];
@@ -67,7 +62,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -109,18 +104,12 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp target teams distribute', but found only 1}}
-// expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
-// expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+// expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target teams distribute collapse (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +5{{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
-// expected-error at +3 {{integral constant expression}}
+// expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp target teams distribute' cannot contain more than one 'collapse' clause}}
// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp target teams distribute collapse (foobool(argc)), collapse (true), collapse (-5)
@@ -132,7 +121,7 @@ int main(int argc, char **argv) {
argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_collapse_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_collapse_messages.cpp
index 4af605c20b79..13d1a789123b 100644
--- a/clang/test/OpenMP/target_teams_distribute_parallel_for_collapse_messages.cpp
+++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_collapse_messages.cpp
@@ -6,20 +6,19 @@
// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target teams distribute parallel for collapse // expected-error {{expected '(' after 'collapse'}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -32,9 +31,8 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
-// expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
-// expected-error at +2 2 {{integral constant expression}}
-// expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+// expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target teams distribute parallel for collapse (argc
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -52,12 +50,9 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp target teams distribute parallel for', but found only 1}}
-#if __cplusplus >= 201103L
-// expected-note at +5 2 {{non-constexpr function 'foobool' cannot be used}}
-#endif
// expected-error at +3 2 {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'collapse' clause}}
// expected-error at +2 {{argument to 'collapse' clause must be a strictly positive integer value}}
-// expected-error at +1 2 {{integral constant expression}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target teams distribute parallel for collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -69,7 +64,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
#if __cplusplus >= 201103L
// expected-error at +4 2 {{integral constant expression must have integral or unscoped enumeration type}}
#else
-// expected-error at +2 2 {{integral constant expression}}
+// expected-error at +2 2 {{integral constant expression}} expected-note at +2 0+{{constant expression}}
#endif
#pragma omp target teams distribute parallel for collapse (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++)
@@ -109,17 +104,11 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp target teams distribute parallel for', but found only 1}}
-#if __cplusplus >= 201103L
-// expected-note at +2 {{non-constexpr function 'foobool' cannot be used}}
-#endif
-#pragma omp target teams distribute parallel for collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}}
+#pragma omp target teams distribute parallel for collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}} expected-note 0+{{constant expression}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
-// expected-note at +5 {{non-constexpr function 'foobool' cannot be used}}
-#endif
-// expected-error at +3 {{integral constant expression}}
+// expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp target teams distribute parallel for' cannot contain more than one 'collapse' clause}}
// expected-error at +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)
@@ -133,7 +122,7 @@ int main(int argc, char **argv) {
#if __cplusplus >= 201103L
// expected-error at +4 {{integral constant expression must have integral or unscoped enumeration type}}
#else
-// expected-error at +2 {{integral constant expression}}
+// expected-error at +2 {{integral constant expression}} expected-note at +2 0+{{constant expression}}
#endif
#pragma omp target teams distribute parallel for collapse (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = 4; i < 12; i++)
diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_messages.cpp
index 65be6e150736..61508b5152b2 100644
--- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_messages.cpp
+++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_collapse_messages.cpp
@@ -6,20 +6,19 @@
// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target teams distribute parallel for simd collapse // expected-error {{expected '(' after 'collapse'}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -32,9 +31,8 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
-// expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
-// expected-error at +2 2 {{integral constant expression}}
-// expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+// expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target teams distribute parallel for simd collapse (argc
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -52,12 +50,9 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp target teams distribute parallel for simd', but found only 1}}
-#if __cplusplus >= 201103L
-// expected-note at +5 2 {{non-constexpr function 'foobool' cannot be used}}
-#endif
// expected-error at +3 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'collapse' clause}}
// expected-error at +2 {{argument to 'collapse' clause must be a strictly positive integer value}}
-// expected-error at +1 2 {{integral constant expression}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target teams distribute 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];
@@ -69,7 +64,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
#if __cplusplus >= 201103L
// expected-error at +4 2 {{integral constant expression must have integral or unscoped enumeration type}}
#else
-// expected-error at +2 2 {{integral constant expression}}
+// expected-error at +2 2 {{integral constant expression}} expected-note at +2 0+{{constant expression}}
#endif
#pragma omp target teams distribute parallel for simd collapse (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++)
@@ -109,17 +104,11 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp target teams distribute parallel for simd', but found only 1}}
-#if __cplusplus >= 201103L
-// expected-note at +2 {{non-constexpr function 'foobool' cannot be used}}
-#endif
-#pragma omp target teams distribute parallel for simd collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}}
+#pragma omp target teams distribute parallel for simd collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}} expected-note 0+{{constant expression}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
-// expected-note at +5 {{non-constexpr function 'foobool' cannot be used}}
-#endif
-// expected-error at +3 {{integral constant expression}}
+// expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'collapse' clause}}
// expected-error at +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)
@@ -133,7 +122,7 @@ int main(int argc, char **argv) {
#if __cplusplus >= 201103L
// expected-error at +4 {{integral constant expression must have integral or unscoped enumeration type}}
#else
-// expected-error at +2 {{integral constant expression}}
+// expected-error at +2 {{integral constant expression}} expected-note at +2 0+{{constant expression}}
#endif
#pragma omp target teams distribute parallel for simd collapse (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = 4; i < 12; i++)
diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_safelen_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_safelen_messages.cpp
index 5d0eaafb531b..31dfb7c8024e 100644
--- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_safelen_messages.cpp
+++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_safelen_messages.cpp
@@ -6,20 +6,19 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target teams distribute parallel for simd safelen // expected-error {{expected '(' after 'safelen'}}
for (int i = ST; i < N; i++)
@@ -32,7 +31,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
#pragma omp target teams distribute parallel for simd safelen () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
-#pragma omp target teams distribute parallel for simd safelen (argc // expected-note {{to match this '('}} expected-error 2 {{integral constant expression}} expected-note 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} expected-error {{expected ')'}}
+#pragma omp target teams distribute parallel for simd safelen (argc // expected-note {{to match this '('}} expected-error 2 {{integral constant expression}} expected-note 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} expected-note 0+{{constant expression}} expected-error {{expected ')'}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -48,12 +47,9 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
-#if __cplusplus >= 201103L
- // expected-note at +5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
// expected-error at +3 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'safelen' clause}}
// expected-error at +2 {{argument to 'safelen' clause must be a strictly positive integer value}}
-// expected-error at +1 2 {{integral constant expression}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{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];
@@ -63,7 +59,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -103,19 +99,14 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
-#pragma omp target teams distribute parallel for simd safelen (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}}
+
+#pragma omp target teams distribute parallel for simd safelen (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}} expected-note 0+{{constant expression}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +5 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
// expected-error at +3 {{argument to 'safelen' clause must be a strictly positive integer value}}
// expected-error at +2 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'safelen' clause}}
-// expected-error at +1 {{integral constant expression}}
+// expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{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];
@@ -125,7 +116,7 @@ int main(int argc, char **argv) {
argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_simdlen_messages.cpp b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_simdlen_messages.cpp
index 2e0f86cfa9bf..14865e593129 100644
--- a/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_simdlen_messages.cpp
+++ b/clang/test/OpenMP/target_teams_distribute_parallel_for_simd_simdlen_messages.cpp
@@ -6,20 +6,19 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target teams distribute parallel for simd safelen // expected-error {{expected '(' after 'safelen'}}
for (int i = ST; i < N; i++)
@@ -32,7 +31,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
#pragma omp target teams distribute parallel for simd safelen () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
-#pragma omp target teams distribute parallel for simd safelen (argc // expected-note {{to match this '('}} expected-error 2 {{integral constant expression}} expected-note 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} expected-error {{expected ')'}}
+#pragma omp target teams distribute parallel for simd safelen (argc // expected-note {{to match this '('}} expected-error 2 {{integral constant expression}} expected-note 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} expected-note 0+{{constant expression}} expected-error {{expected ')'}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -48,12 +47,9 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
-#if __cplusplus >= 201103L
- // expected-note at +5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
// expected-error at +3 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'safelen' clause}}
// expected-error at +2 {{argument to 'safelen' clause must be a strictly positive integer value}}
-// expected-error at +1 2 {{integral constant expression}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{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];
@@ -63,7 +59,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -103,19 +99,13 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
-#pragma omp target teams distribute parallel for simd safelen (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}}
+#pragma omp target teams distribute parallel for simd safelen (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}} expected-note 0+{{constant expression}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +5 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
// expected-error at +3 {{argument to 'safelen' clause must be a strictly positive integer value}}
// expected-error at +2 2 {{directive '#pragma omp target teams distribute parallel for simd' cannot contain more than one 'safelen' clause}}
-// expected-error at +1 {{integral constant expression}}
+// expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{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];
@@ -125,7 +115,7 @@ int main(int argc, char **argv) {
argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/target_teams_distribute_simd_collapse_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_collapse_messages.cpp
index 25e99614eb1f..500980fbd2c4 100644
--- a/clang/test/OpenMP/target_teams_distribute_simd_collapse_messages.cpp
+++ b/clang/test/OpenMP/target_teams_distribute_simd_collapse_messages.cpp
@@ -6,20 +6,19 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target teams distribute simd collapse // expected-error {{expected '(' after 'collapse'}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -32,9 +31,8 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
-// expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
-// expected-error at +2 2 {{integral constant expression}}
-// expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+// expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target teams distribute simd collapse (argc
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -52,12 +50,9 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp target teams distribute simd', but found only 1}}
-// expected-error at +6 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'collapse' clause}}
-// expected-error at +5 {{argument to 'collapse' clause must be a strictly positive integer value}}
-// expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
-// expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+// expected-error at +3 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'collapse' clause}}
+// expected-error at +2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp target teams distribute 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];
@@ -67,7 +62,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -109,19 +104,13 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp target teams distribute simd', but found only 1}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
-#pragma omp target teams distribute simd collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}}
+#pragma omp target teams distribute simd collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}} expected-note 0+{{constant expression}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-// expected-error at +6 {{integral constant expression}}
-// expected-error at +5 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'collapse' clause}}
-// expected-error at +4 {{argument to 'collapse' clause must be a strictly positive integer value}}
-#if __cplusplus >= 201103L
-// expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+// expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
+// expected-error at +2 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'collapse' clause}}
+// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp target teams distribute 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];
@@ -133,7 +122,7 @@ int main(int argc, char **argv) {
#if __cplusplus >= 201103L
// expected-error at +4 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#else
- // expected-error at +2 {{integral constant expression}}
+ // expected-error at +2 {{integral constant expression}} expected-note at +2 0+{{constant expression}}
#endif
#pragma omp target teams distribute simd collapse (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = 4; i < 12; i++)
diff --git a/clang/test/OpenMP/target_teams_distribute_simd_safelen_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_safelen_messages.cpp
index af055250d171..a472b8eddee8 100644
--- a/clang/test/OpenMP/target_teams_distribute_simd_safelen_messages.cpp
+++ b/clang/test/OpenMP/target_teams_distribute_simd_safelen_messages.cpp
@@ -6,20 +6,19 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target teams distribute simd safelen // expected-error {{expected '(' after 'safelen'}}
for (int i = ST; i < N; i++)
@@ -32,7 +31,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
#pragma omp target teams distribute simd safelen () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
-#pragma omp target teams distribute simd safelen (argc // expected-note {{to match this '('}} expected-error 2 {{integral constant expression}} expected-note 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} expected-error {{expected ')'}}
+#pragma omp target teams distribute simd safelen (argc // expected-note {{to match this '('}} expected-error 2 {{integral constant expression}} expected-note 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} expected-note 0+{{constant expression}} expected-error {{expected ')'}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -48,12 +47,9 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
-#if __cplusplus >= 201103L
- // expected-note at +5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
// expected-error at +3 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'safelen' clause}}
// expected-error at +2 {{argument to 'safelen' clause must be a strictly positive integer value}}
-// expected-error at +1 2 {{integral constant expression}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{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];
@@ -63,7 +59,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -103,19 +99,14 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
-#pragma omp target teams distribute simd safelen (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}}
+
+#pragma omp target teams distribute simd safelen (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}} expected-note 0+{{constant expression}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +5 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
// expected-error at +3 {{argument to 'safelen' clause must be a strictly positive integer value}}
// expected-error at +2 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'safelen' clause}}
-// expected-error at +1 {{integral constant expression}}
+// expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{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];
@@ -125,7 +116,7 @@ int main(int argc, char **argv) {
argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/target_teams_distribute_simd_simdlen_messages.cpp b/clang/test/OpenMP/target_teams_distribute_simd_simdlen_messages.cpp
index f54da20babd8..489bb808db54 100644
--- a/clang/test/OpenMP/target_teams_distribute_simd_simdlen_messages.cpp
+++ b/clang/test/OpenMP/target_teams_distribute_simd_simdlen_messages.cpp
@@ -6,20 +6,19 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target teams distribute simd safelen // expected-error {{expected '(' after 'safelen'}}
for (int i = ST; i < N; i++)
@@ -32,7 +31,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
#pragma omp target teams distribute simd safelen () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
-#pragma omp target teams distribute simd safelen (argc // expected-note {{to match this '('}} expected-error 2 {{integral constant expression}} expected-note 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} expected-error {{expected ')'}}
+#pragma omp target teams distribute simd safelen (argc // expected-note {{to match this '('}} expected-error 2 {{integral constant expression}} expected-note 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} expected-note 0+{{constant expression}} expected-error {{expected ')'}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -48,12 +47,9 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
-#if __cplusplus >= 201103L
- // expected-note at +5 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
// expected-error at +3 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'safelen' clause}}
// expected-error at +2 {{argument to 'safelen' clause must be a strictly positive integer value}}
-// expected-error at +1 2 {{integral constant expression}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{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];
@@ -63,7 +59,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -103,19 +99,14 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
-#pragma omp target teams distribute simd safelen (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}}
+
+#pragma omp target teams distribute simd safelen (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}} expected-note 0+{{constant expression}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +5 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
// expected-error at +3 {{argument to 'safelen' clause must be a strictly positive integer value}}
// expected-error at +2 2 {{directive '#pragma omp target teams distribute simd' cannot contain more than one 'safelen' clause}}
-// expected-error at +1 {{integral constant expression}}
+// expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{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];
@@ -125,7 +116,7 @@ int main(int argc, char **argv) {
argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/taskloop_collapse_messages.cpp b/clang/test/OpenMP/taskloop_collapse_messages.cpp
index d004c929dd0d..b07f27a02ff5 100644
--- a/clang/test/OpenMP/taskloop_collapse_messages.cpp
+++ b/clang/test/OpenMP/taskloop_collapse_messages.cpp
@@ -6,29 +6,27 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp taskloop collapse // expected-error {{expected '(' after 'collapse'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp taskloop collapse ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp taskloop collapse () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp taskloop collapse (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
@@ -38,18 +36,15 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp 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 at +6 2 {{directive '#pragma omp taskloop' cannot contain more than one 'collapse' clause}}
- // expected-error at +5 {{argument to 'collapse' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp taskloop' cannot contain more than one 'collapse' clause}}
+ // expected-error at +2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp taskloop collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp taskloop collapse (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -75,16 +70,10 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp taskloop', but found only 1}}
#pragma omp taskloop collapse (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop' are ignored}} expected-note {{as specified in 'collapse' clause}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp taskloop', but found only 1}}
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp taskloop collapse (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp taskloop' cannot contain more than one 'collapse' clause}}
// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp taskloop collapse (foobool(argc)), collapse (true), collapse (-5)
@@ -92,7 +81,7 @@ int main(int argc, char **argv) {
#pragma omp taskloop collapse (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/taskloop_simd_collapse_messages.cpp b/clang/test/OpenMP/taskloop_simd_collapse_messages.cpp
index 485450966898..59c87755e338 100644
--- a/clang/test/OpenMP/taskloop_simd_collapse_messages.cpp
+++ b/clang/test/OpenMP/taskloop_simd_collapse_messages.cpp
@@ -6,29 +6,27 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp taskloop simd collapse // expected-error {{expected '(' after 'collapse'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp taskloop simd collapse ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp taskloop simd collapse () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp taskloop simd collapse (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 2 {{argument to 'collapse' clause must be a strictly positive integer value}}
@@ -38,18 +36,15 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp 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 at +6 2 {{directive '#pragma omp taskloop simd' cannot contain more than one 'collapse' clause}}
- // expected-error at +5 {{argument to 'collapse' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp taskloop simd' cannot contain more than one 'collapse' clause}}
+ // expected-error at +2 {{argument to 'collapse' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp taskloop 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];
#pragma omp taskloop simd collapse (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -75,16 +70,10 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp taskloop simd', but found only 1}}
#pragma omp taskloop simd collapse (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}} expected-note {{as specified in 'collapse' clause}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp taskloop simd', but found only 1}}
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp taskloop simd collapse (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp taskloop simd' cannot contain more than one 'collapse' clause}}
// expected-error at +1 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp taskloop simd collapse (foobool(argc)), collapse (true), collapse (-5)
@@ -92,7 +81,7 @@ int main(int argc, char **argv) {
#pragma omp taskloop simd collapse (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/taskloop_simd_safelen_messages.cpp b/clang/test/OpenMP/taskloop_simd_safelen_messages.cpp
index 491bc5089eda..4930de7eb90b 100644
--- a/clang/test/OpenMP/taskloop_simd_safelen_messages.cpp
+++ b/clang/test/OpenMP/taskloop_simd_safelen_messages.cpp
@@ -6,29 +6,27 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp taskloop simd safelen // expected-error {{expected '(' after 'safelen'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp taskloop simd safelen ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp taskloop simd safelen () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp taskloop simd safelen (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
@@ -38,18 +36,15 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp 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 at +6 2 {{directive '#pragma omp taskloop simd' cannot contain more than one 'safelen' clause}}
- // expected-error at +5 {{argument to 'safelen' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp taskloop simd' cannot contain more than one 'safelen' clause}}
+ // expected-error at +2 {{argument to 'safelen' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp taskloop 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];
#pragma omp taskloop simd safelen (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -73,16 +68,10 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp taskloop simd safelen (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp taskloop simd safelen (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp taskloop simd' cannot contain more than one 'safelen' clause}}
// expected-error at +1 {{argument to 'safelen' clause must be a strictly positive integer value}}
#pragma omp taskloop simd safelen (foobool(argc)), safelen (true), safelen (-5)
@@ -90,7 +79,7 @@ int main(int argc, char **argv) {
#pragma omp taskloop simd safelen (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/taskloop_simd_simdlen_messages.cpp b/clang/test/OpenMP/taskloop_simd_simdlen_messages.cpp
index cd935c9c1dec..af8c553ea4e0 100644
--- a/clang/test/OpenMP/taskloop_simd_simdlen_messages.cpp
+++ b/clang/test/OpenMP/taskloop_simd_simdlen_messages.cpp
@@ -6,29 +6,27 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp taskloop simd simdlen // expected-error {{expected '(' after 'simdlen'}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp taskloop simd simdlen ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp taskloop simd simdlen () // expected-error {{expected expression}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
- // expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
- // expected-error at +2 2 {{integral constant expression}}
- // expected-note at +1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ // expected-error at +2 {{expected ')'}} expected-note at +2 {{to match this '('}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp taskloop simd simdlen (argc
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
// expected-error at +1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
@@ -38,18 +36,15 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp 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 at +6 2 {{directive '#pragma omp taskloop simd' cannot contain more than one 'simdlen' clause}}
- // expected-error at +5 {{argument to 'simdlen' clause must be a strictly positive integer value}}
- // expected-error at +4 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 2 {{directive '#pragma omp taskloop simd' cannot contain more than one 'simdlen' clause}}
+ // expected-error at +2 {{argument to 'simdlen' clause must be a strictly positive integer value}}
+ // expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp taskloop 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];
#pragma omp taskloop simd simdlen (S) // expected-error {{'S' does not refer to a value}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +4 2 {{integral constant expression}}
+ // expected-error at +4 2 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -73,16 +68,10 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#pragma omp taskloop simd simdlen (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp taskloop simd' are ignored}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +4 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{constant expression}}
#pragma omp taskloop simd simdlen (foobool(1) > 0 ? 1 : 2)
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
- // expected-error at +6 {{integral constant expression}}
-#if __cplusplus >= 201103L
- // expected-note at +4 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
// expected-error at +2 2 {{directive '#pragma omp taskloop simd' cannot contain more than one 'simdlen' clause}}
// expected-error at +1 {{argument to 'simdlen' clause must be a strictly positive integer value}}
#pragma omp taskloop simd simdlen (foobool(argc)), simdlen (true), simdlen (-5)
@@ -90,7 +79,7 @@ int main(int argc, char **argv) {
#pragma omp taskloop simd simdlen (S1) // expected-error {{'S1' does not refer to a value}}
for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +4 {{integral constant expression}}
+ // expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
#else
// expected-error at +2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/teams_distribute_collapse_messages.cpp b/clang/test/OpenMP/teams_distribute_collapse_messages.cpp
index f6c9fd948b30..50d8ab2686d3 100644
--- a/clang/test/OpenMP/teams_distribute_collapse_messages.cpp
+++ b/clang/test/OpenMP/teams_distribute_collapse_messages.cpp
@@ -6,20 +6,19 @@
// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target
#pragma omp teams distribute collapse // expected-error {{expected '(' after 'collapse'}}
for (int i = ST; i < N; i++)
@@ -35,9 +34,8 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
-// expected-error at +4 {{expected ')'}} expected-note at +4 {{to match this '('}}
-// expected-error at +3 2 {{integral constant expression}}
-// expected-note at +2 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+// expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
+// expected-error at +2 2 {{integral constant expression}} expected-note at +2 0+{{constant expression}}
#pragma omp target
#pragma omp teams distribute collapse (argc
for (int i = ST; i < N; i++)
@@ -59,12 +57,9 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp teams distribute', but found only 1}}
-#if __cplusplus >= 201103L
-// expected-note at +6 2 {{non-constexpr function 'foobool' cannot be used}}
-#endif
// expected-error at +4 2 {{directive '#pragma omp teams distribute' cannot contain more than one 'collapse' clause}}
// expected-error at +3 {{argument to 'collapse' clause must be a strictly positive integer value}}
-// expected-error at +2 2 {{integral constant expression}}
+// expected-error at +2 2 {{integral constant expression}} expected-note at +2 0+{{constant expression}}
#pragma omp target
#pragma omp teams distribute collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = ST; i < N; i++)
@@ -78,7 +73,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
#if __cplusplus >= 201103L
// expected-error at +5 2 {{integral constant expression must have integral or unscoped enumeration type}}
#else
-// expected-error at +3 2 {{integral constant expression}}
+// expected-error at +3 2 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
#endif
#pragma omp target
#pragma omp teams distribute collapse (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -127,18 +122,12 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp teams distribute', but found only 1}}
-#if __cplusplus >= 201103L
-// expected-note at +3 {{non-constexpr function 'foobool' cannot be used}}
-#endif
#pragma omp target
-#pragma omp teams distribute collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}}
+#pragma omp teams distribute collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}} expected-note 0+{{constant expression}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
-// expected-note at +6 {{non-constexpr function 'foobool' cannot be used}}
-#endif
-// expected-error at +4 {{integral constant expression}}
+// expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
// expected-error at +3 2 {{directive '#pragma omp teams distribute' cannot contain more than one 'collapse' clause}}
// expected-error at +2 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp target
@@ -154,7 +143,7 @@ int main(int argc, char **argv) {
#if __cplusplus >= 201103L
// expected-error at +5 {{integral constant expression must have integral or unscoped enumeration type}}
#else
-// expected-error at +3 {{integral constant expression}}
+// expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
#endif
#pragma omp target
#pragma omp teams distribute collapse (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp
index 1c83ac83785c..1e7d7942b672 100644
--- a/clang/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp
+++ b/clang/test/OpenMP/teams_distribute_parallel_for_collapse_messages.cpp
@@ -6,20 +6,19 @@
// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target
#pragma omp teams distribute parallel for collapse // expected-error {{expected '(' after 'collapse'}}
for (int i = ST; i < N; i++)
@@ -35,9 +34,8 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
-// expected-error at +4 {{expected ')'}} expected-note at +4 {{to match this '('}}
-// expected-error at +3 2 {{integral constant expression}}
-// expected-note at +2 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+// expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
+// expected-error at +2 2 {{integral constant expression}} expected-note at +2 0+{{constant expression}}
#pragma omp target
#pragma omp teams distribute parallel for collapse (argc
for (int i = ST; i < N; i++)
@@ -59,12 +57,9 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp teams distribute parallel for', but found only 1}}
-#if __cplusplus >= 201103L
-// expected-note at +6 2 {{non-constexpr function 'foobool' cannot be used}}
-#endif
// expected-error at +4 2 {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'collapse' clause}}
// expected-error at +3 {{argument to 'collapse' clause must be a strictly positive integer value}}
-// expected-error at +2 2 {{integral constant expression}}
+// expected-error at +2 2 {{integral constant expression}} expected-note at +2 0+{{constant expression}}
#pragma omp target
#pragma omp teams distribute parallel for collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = ST; i < N; i++)
@@ -77,7 +72,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
#if __cplusplus >= 201103L
// expected-error at +5 2 {{integral constant expression must have integral or unscoped enumeration type}}
#else
-// expected-error at +3 2 {{integral constant expression}}
+// expected-error at +3 2 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
#endif
#pragma omp target
#pragma omp teams distribute parallel for collapse (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -126,18 +121,12 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp teams distribute parallel for', but found only 1}}
-#if __cplusplus >= 201103L
-// expected-note at +3 {{non-constexpr function 'foobool' cannot be used}}
-#endif
#pragma omp target
-#pragma omp teams distribute parallel for collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}}
+#pragma omp teams distribute parallel for collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}} expected-note 0+{{constant expression}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
-// expected-note at +6 {{non-constexpr function 'foobool' cannot be used}}
-#endif
-// expected-error at +4 {{integral constant expression}}
+// expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
// expected-error at +3 2 {{directive '#pragma omp teams distribute parallel for' cannot contain more than one 'collapse' clause}}
// expected-error at +2 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp target
@@ -153,7 +142,7 @@ int main(int argc, char **argv) {
#if __cplusplus >= 201103L
// expected-error at +5 {{integral constant expression must have integral or unscoped enumeration type}}
#else
-// expected-error at +3 {{integral constant expression}}
+// expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
#endif
#pragma omp target
#pragma omp teams distribute parallel for collapse (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp
index 8558f1b31bde..63132be20c9b 100644
--- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp
+++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_collapse_messages.cpp
@@ -6,20 +6,19 @@
// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++98 -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd %s -std=c++11 -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target
#pragma omp teams distribute parallel for simd collapse // expected-error {{expected '(' after 'collapse'}}
for (int i = ST; i < N; i++)
@@ -35,9 +34,8 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
-// expected-error at +4 {{expected ')'}} expected-note at +4 {{to match this '('}}
-// expected-error at +3 2 {{integral constant expression}}
-// expected-note at +2 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+// expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
+// expected-error at +2 2 {{integral constant expression}} expected-note at +2 0+{{constant expression}}
#pragma omp target
#pragma omp teams distribute parallel for simd collapse (argc
for (int i = ST; i < N; i++)
@@ -59,12 +57,9 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp teams distribute parallel for simd', but found only 1}}
-#if __cplusplus >= 201103L
-// expected-note at +6 2 {{non-constexpr function 'foobool' cannot be used}}
-#endif
// expected-error at +4 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'collapse' clause}}
// expected-error at +3 {{argument to 'collapse' clause must be a strictly positive integer value}}
-// expected-error at +2 2 {{integral constant expression}}
+// expected-error at +2 2 {{integral constant expression}} expected-note at +2 0+{{constant expression}}
#pragma omp target
#pragma omp teams distribute parallel for simd collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = ST; i < N; i++)
@@ -77,7 +72,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
#if __cplusplus >= 201103L
// expected-error at +5 2 {{integral constant expression must have integral or unscoped enumeration type}}
#else
-// expected-error at +3 2 {{integral constant expression}}
+// expected-error at +3 2 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
#endif
#pragma omp target
#pragma omp teams distribute parallel for simd collapse (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -126,18 +121,12 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp teams distribute parallel for simd', but found only 1}}
-#if __cplusplus >= 201103L
-// expected-note at +3 {{non-constexpr function 'foobool' cannot be used}}
-#endif
#pragma omp target
-#pragma omp teams distribute parallel for simd collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}}
+#pragma omp teams distribute parallel for simd collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}} expected-note 0+{{constant expression}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
-// expected-note at +6 {{non-constexpr function 'foobool' cannot be used}}
-#endif
-// expected-error at +4 {{integral constant expression}}
+// expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
// expected-error at +3 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'collapse' clause}}
// expected-error at +2 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp target
@@ -153,7 +142,7 @@ int main(int argc, char **argv) {
#if __cplusplus >= 201103L
// expected-error at +5 {{integral constant expression must have integral or unscoped enumeration type}}
#else
-// expected-error at +3 {{integral constant expression}}
+// expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
#endif
#pragma omp target
#pragma omp teams distribute parallel for simd collapse (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_safelen_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_safelen_messages.cpp
index 019427fe3f3e..122b9cbe098b 100644
--- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_safelen_messages.cpp
+++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_safelen_messages.cpp
@@ -6,20 +6,19 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target
#pragma omp teams distribute parallel for simd safelen // expected-error {{expected '(' after 'safelen'}}
@@ -36,7 +35,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target
-#pragma omp teams distribute parallel for simd safelen (argc // expected-note {{to match this '('}} expected-error 2 {{integral constant expression}} expected-note 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} expected-error {{expected ')'}}
+#pragma omp teams distribute parallel for simd safelen (argc // expected-note {{to match this '('}} expected-error 2 {{integral constant expression}} expected-note 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} expected-note 0+{{constant expression}} expected-error {{expected ')'}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -55,13 +54,10 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
-#if __cplusplus >= 201103L
- // expected-note at +6 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
#pragma omp target
// expected-error at +3 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'safelen' clause}}
// expected-error at +2 {{argument to 'safelen' clause must be a strictly positive integer value}}
-// expected-error at +1 2 {{integral constant expression}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{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];
@@ -72,7 +68,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +5 2 {{integral constant expression}}
+ // expected-error at +5 2 {{integral constant expression}} expected-note at +5 0+{{constant expression}}
#else
// expected-error at +3 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -120,21 +116,16 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +3 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+
#pragma omp target
-#pragma omp teams distribute parallel for simd safelen (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}}
+#pragma omp teams distribute parallel for simd safelen (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}} expected-note 0+{{constant expression}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +6 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
#pragma omp target
// expected-error at +3 {{argument to 'safelen' clause must be a strictly positive integer value}}
// expected-error at +2 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'safelen' clause}}
-// expected-error at +1 {{integral constant expression}}
+// expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{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];
@@ -145,7 +136,7 @@ int main(int argc, char **argv) {
argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +5 {{integral constant expression}}
+ // expected-error at +5 {{integral constant expression}} expected-note at +5 0+{{constant expression}}
#else
// expected-error at +3 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/teams_distribute_parallel_for_simd_simdlen_messages.cpp b/clang/test/OpenMP/teams_distribute_parallel_for_simd_simdlen_messages.cpp
index 019427fe3f3e..122b9cbe098b 100644
--- a/clang/test/OpenMP/teams_distribute_parallel_for_simd_simdlen_messages.cpp
+++ b/clang/test/OpenMP/teams_distribute_parallel_for_simd_simdlen_messages.cpp
@@ -6,20 +6,19 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target
#pragma omp teams distribute parallel for simd safelen // expected-error {{expected '(' after 'safelen'}}
@@ -36,7 +35,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target
-#pragma omp teams distribute parallel for simd safelen (argc // expected-note {{to match this '('}} expected-error 2 {{integral constant expression}} expected-note 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} expected-error {{expected ')'}}
+#pragma omp teams distribute parallel for simd safelen (argc // expected-note {{to match this '('}} expected-error 2 {{integral constant expression}} expected-note 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} expected-note 0+{{constant expression}} expected-error {{expected ')'}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -55,13 +54,10 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
-#if __cplusplus >= 201103L
- // expected-note at +6 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
#pragma omp target
// expected-error at +3 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'safelen' clause}}
// expected-error at +2 {{argument to 'safelen' clause must be a strictly positive integer value}}
-// expected-error at +1 2 {{integral constant expression}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{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];
@@ -72,7 +68,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +5 2 {{integral constant expression}}
+ // expected-error at +5 2 {{integral constant expression}} expected-note at +5 0+{{constant expression}}
#else
// expected-error at +3 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -120,21 +116,16 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +3 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+
#pragma omp target
-#pragma omp teams distribute parallel for simd safelen (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}}
+#pragma omp teams distribute parallel for simd safelen (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}} expected-note 0+{{constant expression}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +6 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
#pragma omp target
// expected-error at +3 {{argument to 'safelen' clause must be a strictly positive integer value}}
// expected-error at +2 2 {{directive '#pragma omp teams distribute parallel for simd' cannot contain more than one 'safelen' clause}}
-// expected-error at +1 {{integral constant expression}}
+// expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{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];
@@ -145,7 +136,7 @@ int main(int argc, char **argv) {
argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +5 {{integral constant expression}}
+ // expected-error at +5 {{integral constant expression}} expected-note at +5 0+{{constant expression}}
#else
// expected-error at +3 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/teams_distribute_simd_collapse_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_collapse_messages.cpp
index e7ce4d94386f..bc1833d9f605 100644
--- a/clang/test/OpenMP/teams_distribute_simd_collapse_messages.cpp
+++ b/clang/test/OpenMP/teams_distribute_simd_collapse_messages.cpp
@@ -6,20 +6,19 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target
#pragma omp teams distribute simd collapse // expected-error {{expected '(' after 'collapse'}}
for (int i = ST; i < N; i++)
@@ -35,9 +34,8 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
-// expected-error at +4 {{expected ')'}} expected-note at +4 {{to match this '('}}
-// expected-error at +3 2 {{integral constant expression}}
-// expected-note at +2 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+// expected-error at +3 {{expected ')'}} expected-note at +3 {{to match this '('}}
+// expected-error at +2 2 {{integral constant expression}} expected-note at +2 0+{{constant expression}}
#pragma omp target
#pragma omp teams distribute simd collapse (argc
for (int i = ST; i < N; i++)
@@ -59,12 +57,9 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp teams distribute simd', but found only 1}}
-// expected-error at +7 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'collapse' clause}}
-// expected-error at +6 {{argument to 'collapse' clause must be a strictly positive integer value}}
-// expected-error at +5 2 {{integral constant expression}}
-#if __cplusplus >= 201103L
-// expected-note at +3 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+// expected-error at +4 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'collapse' clause}}
+// expected-error at +3 {{argument to 'collapse' clause must be a strictly positive integer value}}
+// expected-error at +2 2 {{integral constant expression}} expected-note at +2 0+{{constant expression}}
#pragma omp target
#pragma omp teams distribute simd collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = ST; i < N; i++)
@@ -75,7 +70,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +5 2 {{integral constant expression}}
+ // expected-error at +5 2 {{integral constant expression}} expected-note at +5 0+{{constant expression}}
#else
// expected-error at +3 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -126,20 +121,14 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp teams distribute simd', but found only 1}}
-#if __cplusplus >= 201103L
- // expected-note at +3 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
#pragma omp target
-#pragma omp teams distribute simd collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}}
+#pragma omp teams distribute simd collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}} expected-note 0+{{constant expression}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-// expected-error at +7 {{integral constant expression}}
-// expected-error at +6 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'collapse' clause}}
-// expected-error at +5 {{argument to 'collapse' clause must be a strictly positive integer value}}
-#if __cplusplus >= 201103L
-// expected-note at +3 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+// expected-error at +4 {{integral constant expression}} expected-note at +4 0+{{constant expression}}
+// expected-error at +3 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'collapse' clause}}
+// expected-error at +2 {{argument to 'collapse' clause must be a strictly positive integer value}}
#pragma omp target
#pragma omp teams distribute simd collapse (foobool(argc)), collapse (true), collapse (-5)
for (int i = 4; i < 12; i++)
@@ -153,7 +142,7 @@ int main(int argc, char **argv) {
#if __cplusplus >= 201103L
// expected-error at +5 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#else
- // expected-error at +3 {{integral constant expression}}
+ // expected-error at +3 {{integral constant expression}} expected-note at +3 0+{{constant expression}}
#endif
#pragma omp target
#pragma omp teams distribute simd collapse (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
diff --git a/clang/test/OpenMP/teams_distribute_simd_safelen_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_safelen_messages.cpp
index fe83ffdca020..4efede29baee 100644
--- a/clang/test/OpenMP/teams_distribute_simd_safelen_messages.cpp
+++ b/clang/test/OpenMP/teams_distribute_simd_safelen_messages.cpp
@@ -6,20 +6,19 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target
#pragma omp teams distribute simd safelen // expected-error {{expected '(' after 'safelen'}}
@@ -36,7 +35,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target
-#pragma omp teams distribute simd safelen (argc // expected-note {{to match this '('}} expected-error 2 {{integral constant expression}} expected-note 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} expected-error {{expected ')'}}
+#pragma omp teams distribute simd safelen (argc // expected-note {{to match this '('}} expected-error 2 {{integral constant expression}} expected-note 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} expected-note 0+{{constant expression}} expected-error {{expected ')'}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -55,13 +54,10 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
-#if __cplusplus >= 201103L
- // expected-note at +6 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
#pragma omp target
// expected-error at +3 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'safelen' clause}}
// expected-error at +2 {{argument to 'safelen' clause must be a strictly positive integer value}}
-// expected-error at +1 2 {{integral constant expression}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{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];
@@ -72,7 +68,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +5 2 {{integral constant expression}}
+ // expected-error at +5 2 {{integral constant expression}} expected-note at +5 0+{{constant expression}}
#else
// expected-error at +3 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -120,21 +116,16 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +3 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+
#pragma omp target
-#pragma omp teams distribute simd safelen (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}}
+#pragma omp teams distribute simd safelen (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}} expected-note 0+{{constant expression}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +6 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
#pragma omp target
// expected-error at +3 {{argument to 'safelen' clause must be a strictly positive integer value}}
// expected-error at +2 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'safelen' clause}}
-// expected-error at +1 {{integral constant expression}}
+// expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{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];
@@ -145,7 +136,7 @@ int main(int argc, char **argv) {
argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +5 {{integral constant expression}}
+ // expected-error at +5 {{integral constant expression}} expected-note at +5 0+{{constant expression}}
#else
// expected-error at +3 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
diff --git a/clang/test/OpenMP/teams_distribute_simd_simdlen_messages.cpp b/clang/test/OpenMP/teams_distribute_simd_simdlen_messages.cpp
index fe83ffdca020..4efede29baee 100644
--- a/clang/test/OpenMP/teams_distribute_simd_simdlen_messages.cpp
+++ b/clang/test/OpenMP/teams_distribute_simd_simdlen_messages.cpp
@@ -6,20 +6,19 @@
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++98 %s -Wuninitialized
// RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 %s -Wuninitialized
+// expected-note@* 0+{{declared here}}
+
void foo() {
}
-#if __cplusplus >= 201103L
-// expected-note at +2 4 {{declared here}}
-#endif
bool foobool(int argc) {
return argc;
}
-struct S1; // expected-note {{declared here}}
+struct S1;
-template <class T, typename S, int N, int ST> // expected-note {{declared here}}
-T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+template <class T, typename S, int N, int ST>
+T tmain(T argc, S **argv) {
#pragma omp target
#pragma omp teams distribute simd safelen // expected-error {{expected '(' after 'safelen'}}
@@ -36,7 +35,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
#pragma omp target
-#pragma omp teams distribute simd safelen (argc // expected-note {{to match this '('}} expected-error 2 {{integral constant expression}} expected-note 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} expected-error {{expected ')'}}
+#pragma omp teams distribute simd safelen (argc // expected-note {{to match this '('}} expected-error 2 {{integral constant expression}} expected-note 2 {{read of non-const variable 'argc' is not allowed in a constant expression}} expected-note 0+{{constant expression}} expected-error {{expected ')'}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
@@ -55,13 +54,10 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
for (int i = ST; i < N; i++)
argv[0][i] = argv[0][i] - argv[0][i-ST];
-#if __cplusplus >= 201103L
- // expected-note at +6 2 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
#pragma omp target
// expected-error at +3 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'safelen' clause}}
// expected-error at +2 {{argument to 'safelen' clause must be a strictly positive integer value}}
-// expected-error at +1 2 {{integral constant expression}}
+// expected-error at +1 2 {{integral constant expression}} expected-note at +1 0+{{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];
@@ -72,7 +68,7 @@ T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
argv[0][i] = argv[0][i] - argv[0][i-ST];
#if __cplusplus <= 199711L
- // expected-error at +5 2 {{integral constant expression}}
+ // expected-error at +5 2 {{integral constant expression}} expected-note at +5 0+{{constant expression}}
#else
// expected-error at +3 2 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
@@ -120,21 +116,16 @@ int main(int argc, char **argv) {
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +3 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
+
#pragma omp target
-#pragma omp teams distribute simd safelen (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}}
+#pragma omp teams distribute simd safelen (foobool(1) > 0 ? 1 : 2) // expected-error {{integral constant expression}} expected-note 0+{{constant expression}}
for (int i = 4; i < 12; i++)
argv[0][i] = argv[0][i] - argv[0][i-4];
-#if __cplusplus >= 201103L
- // expected-note at +6 {{non-constexpr function 'foobool' cannot be used in a constant expression}}
-#endif
#pragma omp target
// expected-error at +3 {{argument to 'safelen' clause must be a strictly positive integer value}}
// expected-error at +2 2 {{directive '#pragma omp teams distribute simd' cannot contain more than one 'safelen' clause}}
-// expected-error at +1 {{integral constant expression}}
+// expected-error at +1 {{integral constant expression}} expected-note at +1 0+{{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];
@@ -145,7 +136,7 @@ int main(int argc, char **argv) {
argv[0][i] = argv[0][i] - argv[0][i-4];
#if __cplusplus <= 199711L
- // expected-error at +5 {{integral constant expression}}
+ // expected-error at +5 {{integral constant expression}} expected-note at +5 0+{{constant expression}}
#else
// expected-error at +3 {{integral constant expression must have integral or unscoped enumeration type, not 'char *'}}
#endif
More information about the cfe-commits
mailing list