[flang-commits] [flang] 54acf9a - [Flang][OpenMP] NFC: Change a few message/comments to fit 80chars
Kiran Chandramohan via flang-commits
flang-commits at lists.llvm.org
Mon Feb 27 08:42:15 PST 2023
Author: Kiran Chandramohan
Date: 2023-02-27T16:31:39Z
New Revision: 54acf9a3a31ef1a18b7b9b10143296e7c3c077fd
URL: https://github.com/llvm/llvm-project/commit/54acf9a3a31ef1a18b7b9b10143296e7c3c077fd
DIFF: https://github.com/llvm/llvm-project/commit/54acf9a3a31ef1a18b7b9b10143296e7c3c077fd.diff
LOG: [Flang][OpenMP] NFC: Change a few message/comments to fit 80chars
Changes are all in the OpenMP semantic checks file.
Reviewed By: SBallantyne
Differential Revision: https://reviews.llvm.org/D144874
Added:
Modified:
flang/lib/Semantics/check-omp-structure.cpp
Removed:
################################################################################
diff --git a/flang/lib/Semantics/check-omp-structure.cpp b/flang/lib/Semantics/check-omp-structure.cpp
index c29e9a9502104..b30ea418b1e7e 100644
--- a/flang/lib/Semantics/check-omp-structure.cpp
+++ b/flang/lib/Semantics/check-omp-structure.cpp
@@ -111,7 +111,8 @@ class OmpCycleChecker {
}
if (cycleLevel_ > 0 || err) {
context_.Say(*cycleSource_,
- "CYCLE statement to non-innermost associated loop of an OpenMP DO construct"_err_en_US);
+ "CYCLE statement to non-innermost associated loop of an OpenMP DO "
+ "construct"_err_en_US);
}
return true;
}
@@ -245,7 +246,8 @@ void OmpStructureChecker::HasInvalidDistributeNesting(
}
if (violation) {
context_.Say(beginDir.source,
- "`DISTRIBUTE` region has to be strictly nested inside `TEAMS` region."_err_en_US);
+ "`DISTRIBUTE` region has to be strictly nested inside `TEAMS` "
+ "region."_err_en_US);
}
}
@@ -270,7 +272,8 @@ void OmpStructureChecker::HasInvalidTeamsNesting(
if (!allowedSet.test(dir)) {
context_.Say(source,
- "Only `DISTRIBUTE` or `PARALLEL` regions are allowed to be strictly nested inside `TEAMS` region."_err_en_US);
+ "Only `DISTRIBUTE` or `PARALLEL` regions are allowed to be strictly "
+ "nested inside `TEAMS` region."_err_en_US);
}
}
@@ -335,8 +338,10 @@ void OmpStructureChecker::CheckHintClause(
std::get_if<Fortran::parser::OmpClause::Hint>(&ompClause->u)}) {
std::optional<std::int64_t> hintValue = GetIntValue(hintClause->v);
if (hintValue && *hintValue >= 0) {
- if((*hintValue & 0xC) == 0xC /*`omp_sync_hint_nonspeculative` and `omp_lock_hint_speculative`*/
- || (*hintValue & 0x3) == 0x3 /*`omp_sync_hint_uncontended` and omp_sync_hint_contended*/ )
+ /*`omp_sync_hint_nonspeculative` and `omp_lock_hint_speculative`*/
+ if ((*hintValue & 0xC) == 0xC
+ /*`omp_sync_hint_uncontended` and omp_sync_hint_contended*/
+ || (*hintValue & 0x3) == 0x3)
context_.Say(clause.source,
"Hint clause value "
"is not a valid OpenMP synchronization value"_err_en_US);
@@ -550,9 +555,9 @@ void OmpStructureChecker::CheckSIMDNest(const parser::OpenMPConstruct &c) {
if (!eligibleSIMD) {
context_.Say(parser::FindSourceLocation(c),
"The only OpenMP constructs that can be encountered during execution "
- "of a 'SIMD'"
- " region are the `ATOMIC` construct, the `LOOP` construct, the `SIMD`"
- " construct and the `ORDERED` construct with the `SIMD` clause."_err_en_US);
+ "of a 'SIMD' region are the `ATOMIC` construct, the `LOOP` construct, "
+ "the `SIMD` construct and the `ORDERED` construct with the `SIMD` "
+ "clause."_err_en_US);
}
}
@@ -707,7 +712,9 @@ void OmpStructureChecker::CheckDistLinear(
for (auto var : indexVars) {
const Symbol &root{GetAssociationRoot(var)};
context_.Say(parser::FindSourceLocation(x),
- "Variable '%s' not allowed in `LINEAR` clause, only loop iterator can be specified in `LINEAR` clause of a construct combined with `DISTRIBUTE`"_err_en_US,
+ "Variable '%s' not allowed in `LINEAR` clause, only loop iterator "
+ "can be specified in `LINEAR` clause of a construct combined with "
+ "`DISTRIBUTE`"_err_en_US,
root.name());
}
}
@@ -1025,7 +1032,8 @@ void OmpStructureChecker::CheckThreadprivateOrDeclareTargetVar(
context_.Say(name->source,
"A variable that appears in a %s directive must be "
"declared in the scope of a module or have the SAVE "
- "attribute, either explicitly or implicitly"_err_en_US,
+ "attribute, either explicitly or "
+ "implicitly"_err_en_US,
ContextDirectiveAsFortran());
} else if (useScope != declScope) {
context_.Say(name->source,
@@ -1334,7 +1342,8 @@ void OmpStructureChecker::Enter(const parser::OpenMPCriticalConstruct &x) {
ompClause.source.NULTerminatedToString() != "hint(omp_sync_hint_none)") {
context_.Say(dir.source,
parser::MessageFormattedText{
- "Hint clause other than omp_sync_hint_none cannot be specified for an unnamed CRITICAL directive"_err_en_US});
+ "Hint clause other than omp_sync_hint_none cannot be specified for "
+ "an unnamed CRITICAL directive"_err_en_US});
}
CheckHintClause<const parser::OmpClauseList>(&ompClause, nullptr);
}
@@ -1593,7 +1602,8 @@ void OmpStructureChecker::CheckAtomicUpdateAssignmentStmt(
[&](const auto &x) {
if (!IsOperatorValid(x, var)) {
context_.Say(expr.source,
- "Invalid operator in OpenMP ATOMIC (UPDATE) statement"_err_en_US);
+ "Invalid operator in OpenMP ATOMIC (UPDATE) "
+ "statement"_err_en_US);
}
},
},
@@ -1929,7 +1939,8 @@ bool OmpStructureChecker::CheckReductionOperators(
ok = true;
} else {
context_.Say(GetContext().clauseSource,
- "Invalid reduction identifier in REDUCTION clause."_err_en_US,
+ "Invalid reduction identifier in REDUCTION "
+ "clause."_err_en_US,
ContextDirectiveAsFortran());
}
}
@@ -1952,7 +1963,8 @@ bool OmpStructureChecker::CheckIntrinsicOperator(
return true;
case parser::DefinedOperator::IntrinsicOperator::Subtract:
context_.Say(GetContext().clauseSource,
- "The minus reduction operator is deprecated since OpenMP 5.2 and is not supported in the REDUCTION clause."_err_en_US,
+ "The minus reduction operator is deprecated since OpenMP 5.2 and is "
+ "not supported in the REDUCTION clause."_err_en_US,
ContextDirectiveAsFortran());
break;
default:
@@ -2037,8 +2049,7 @@ void OmpStructureChecker::CheckMultipleAppearanceAcrossContext(
"%s variable '%s' is %s in outer context must"
" be shared in the parallel regions to which any"
" of the worksharing regions arising from the "
- "worksharing"
- " construct bind."_err_en_US,
+ "worksharing construct bind."_err_en_US,
parser::ToUpperCaseLetters(
getClauseName(llvm::omp::Clause::OMPC_reduction)
.str()),
@@ -2540,7 +2551,8 @@ void OmpStructureChecker::CheckArraySection(
if ((stride && stride != 1)) {
context_.Say(GetContext().clauseSource,
"A list item that appears in a REDUCTION clause"
- " should have a contiguous storage array section."_err_en_US,
+ " should have a contiguous storage array "
+ "section."_err_en_US,
ContextDirectiveAsFortran());
break;
}
More information about the flang-commits
mailing list