[llvm-branch-commits] [flang] [flang][OpenMP] Add version checks for clauses (PR #110015)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Sep 25 09:52:12 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff c04b0c4e26240e2c1a47b9af4974981ab4535305 3c786ad2a50f146d357d882b0c1d966486f7295f --extensions h,cpp -- flang/lib/Semantics/check-omp-structure.cpp flang/lib/Semantics/check-omp-structure.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/lib/Semantics/check-omp-structure.cpp b/flang/lib/Semantics/check-omp-structure.cpp
index 976c159e25..239bc38392 100644
--- a/flang/lib/Semantics/check-omp-structure.cpp
+++ b/flang/lib/Semantics/check-omp-structure.cpp
@@ -187,14 +187,14 @@ bool OmpStructureChecker::CheckAllowedClause(llvmOmpClause clause) {
// Only report it if there is a later version that allows it.
// If it's not allowed at all, it will be reported by CheckAllowed.
if (allowedInVersion != 0) {
- std::string thisVersion{std::to_string(version / 10) + "." +
- std::to_string(version % 10)};
+ std::string thisVersion{
+ std::to_string(version / 10) + "." + std::to_string(version % 10)};
std::string goodVersion{std::to_string(allowedInVersion)};
context_.Say(dirCtx.clauseSource,
- "%s clause is not allowed on directive %s in OpenMP v%s, "
- "try -fopenmp-version=%d"_err_en_US,
- clauseName, dirName, thisVersion, allowedInVersion);
+ "%s clause is not allowed on directive %s in OpenMP v%s, "
+ "try -fopenmp-version=%d"_err_en_US,
+ clauseName, dirName, thisVersion, allowedInVersion);
}
}
return CheckAllowed(clause);
``````````
</details>
https://github.com/llvm/llvm-project/pull/110015
More information about the llvm-branch-commits
mailing list