[flang] [llvm] [flang][OpenMP]Add support for fail clause (PR #118683)
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 4 12:54:03 PST 2024
================
@@ -2486,17 +2486,28 @@ void OmpStructureChecker::CheckAtomicMemoryOrderClause(
const parser::OmpAtomicClauseList *leftHandClauseList,
const parser::OmpAtomicClauseList *rightHandClauseList) {
int numMemoryOrderClause = 0;
+ int numFailClause = 0;
auto checkForValidMemoryOrderClause =
[&](const parser::OmpAtomicClauseList *clauseList) {
for (const auto &clause : clauseList->v) {
- if (std::get_if<Fortran::parser::OmpMemoryOrderClause>(&clause.u)) {
- numMemoryOrderClause++;
- if (numMemoryOrderClause > 1) {
+ if (std::get_if<parser::OmpFailClause>(&clause.u)) {
+ numFailClause++;
+ if (numFailClause > 1) {
context_.Say(clause.source,
- "More than one memory order clause not allowed on "
+ "More than one fail clause not allowed on "
----------------
kparzysz wrote:
Could you spell FAIL in all capital letters? This is the convention in diagnostic messages.
Also, could you concatenate the strings into a single line. The line will be "too long", but we do that to make grepping for messages in the sources easier.
Finally, please replace the "OpenMP Atomic construct" with "ATOMIC construct".
https://github.com/llvm/llvm-project/pull/118683
More information about the llvm-commits
mailing list