diff options
author | erichkeane <ekeane@nvidia.com> | 2024-02-23 10:01:40 -0800 |
---|---|---|
committer | erichkeane <ekeane@nvidia.com> | 2024-02-23 10:02:26 -0800 |
commit | 8fe4487e23e543568745ef461660b1d288805b81 (patch) | |
tree | 8f861f8ce5dd889797b2b906c984846a1db6aa11 | |
parent | 3e9e5e277129041fe781f1f2bb04f69269d3fa1f (diff) |
[OpenACC] Fix branch-in/out to not refer to a 'region'
'region' is not a term of art in OpenACC, so switch it to refer to
'Compute Construct', which is accurate/reflects the standard.
-rw-r--r-- | clang/include/clang/Basic/DiagnosticSemaKinds.td | 2 | ||||
-rw-r--r-- | clang/test/SemaOpenACC/no-branch-in-out.c | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index ebda201361fb..a7f2858477be 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -12204,5 +12204,5 @@ def err_acc_construct_appertainment : Error<"OpenACC construct '%0' cannot be used here; it can only " "be used in a statement context">; def err_acc_branch_in_out - : Error<"invalid branch %select{out of|into}0 OpenACC region">; + : Error<"invalid branch %select{out of|into}0 OpenACC Compute Construct">; } // end of sema component. diff --git a/clang/test/SemaOpenACC/no-branch-in-out.c b/clang/test/SemaOpenACC/no-branch-in-out.c index 622cf55f4847..33a171f1b68d 100644 --- a/clang/test/SemaOpenACC/no-branch-in-out.c +++ b/clang/test/SemaOpenACC/no-branch-in-out.c @@ -14,7 +14,7 @@ void BreakContinue() { if (i == 2) continue; - break; // expected-error{{invalid branch out of OpenACC region}} + break; // expected-error{{invalid branch out of OpenACC Compute Construct}} } int j; @@ -22,7 +22,7 @@ void BreakContinue() { case 0: #pragma acc parallel { - break; // expected-error{{invalid branch out of OpenACC region}} + break; // expected-error{{invalid branch out of OpenACC Compute Construct}} } case 1: #pragma acc parallel @@ -34,7 +34,7 @@ void BreakContinue() { #pragma acc parallel for(int i = 0; i < 5; ++i) { if (i > 1) - break; // expected-error{{invalid branch out of OpenACC region}} + break; // expected-error{{invalid branch out of OpenACC Compute Construct}} } #pragma acc parallel @@ -54,7 +54,7 @@ void BreakContinue() { for (int i =0; i < 5; ++i) { #pragma acc parallel { - continue; // expected-error{{invalid branch out of OpenACC region}} + continue; // expected-error{{invalid branch out of OpenACC Compute Construct}} } } @@ -73,7 +73,7 @@ void BreakContinue() { for (int i =0; i < 5; ++i) { #pragma acc parallel { - break; // expected-error{{invalid branch out of OpenACC region}} + break; // expected-error{{invalid branch out of OpenACC Compute Construct}} } } @@ -81,14 +81,14 @@ void BreakContinue() { while (j) { --j; if (j > 4) - break; // expected-error{{invalid branch out of OpenACC region}} + break; // expected-error{{invalid branch out of OpenACC Compute Construct}} } #pragma acc parallel do { --j; if (j > 4) - break; // expected-error{{invalid branch out of OpenACC region}} + break; // expected-error{{invalid branch out of OpenACC Compute Construct}} } while (j ); } |