[clang] 8fe4487 - [OpenACC] Fix branch-in/out to not refer to a 'region'
via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 23 10:02:31 PST 2024
Author: erichkeane
Date: 2024-02-23T10:02:26-08:00
New Revision: 8fe4487e23e543568745ef461660b1d288805b81
URL: https://github.com/llvm/llvm-project/commit/8fe4487e23e543568745ef461660b1d288805b81
DIFF: https://github.com/llvm/llvm-project/commit/8fe4487e23e543568745ef461660b1d288805b81.diff
LOG: [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.
Added:
Modified:
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/test/SemaOpenACC/no-branch-in-out.c
Removed:
################################################################################
diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td
index ebda201361fb07..a7f2858477bee6 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 622cf55f484739..33a171f1b68d51 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 );
}
More information about the cfe-commits
mailing list