[flang-commits] [flang] [flang][OpenMP] Verify that N in -fopenmp-version=N is valid (PR #145725)
via flang-commits
flang-commits at lists.llvm.org
Wed Jun 25 08:50:39 PDT 2025
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 HEAD~1 HEAD --extensions cpp -- flang/lib/Frontend/CompilerInvocation.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp
index 230991f0a..07d6814da 100644
--- a/flang/lib/Frontend/CompilerInvocation.cpp
+++ b/flang/lib/Frontend/CompilerInvocation.cpp
@@ -1166,9 +1166,9 @@ static bool parseOpenMPArgs(CompilerInvocation &res, llvm::opt::ArgList &args,
res.getLangOpts().OpenMPVersion = version;
} else if (llvm::is_contained(oldVersions, version)) {
const unsigned diagID =
- diags.getCustomDiagID(clang::DiagnosticsEngine::Warning,
- "OpenMP version %0 is no longer supported, "
- "assuming version %1");
+ diags.getCustomDiagID(clang::DiagnosticsEngine::Warning,
+ "OpenMP version %0 is no longer supported, "
+ "assuming version %1");
std::string assumed = std::to_string(res.getLangOpts().OpenMPVersion);
diags.Report(diagID) << value << assumed;
} else {
``````````
</details>
https://github.com/llvm/llvm-project/pull/145725
More information about the flang-commits
mailing list