[flang-commits] [flang] [Flang] Fix -Wopen-mp-* and -Wopen-acc-* flag spellings (PR #188434)
Michael Klemm via flang-commits
flang-commits at lists.llvm.org
Fri Mar 27 09:11:47 PDT 2026
================
@@ -1048,6 +1048,17 @@ static bool parseDiagArgs(CompilerInvocation &res, llvm::opt::ArgList &args,
const unsigned diagID = diags.getCustomDiagID(
clang::DiagnosticsEngine::Error, "Unknown diagnostic option: -W%0");
diags.Report(diagID) << wArg;
+ } else {
+ if (auto canonical{features.GetCanonicalSpelling(wArg)}) {
+ std::string suggestion{*canonical};
+ if (wArg.size() > 3 && wArg.substr(0, 3) == "no-") {
----------------
mjklemm wrote:
I guess I could go all the way with `StringRef` instead of `string_view`. Either way will be fine with me and I will follow your recommendation here.
https://github.com/llvm/llvm-project/pull/188434
More information about the flang-commits
mailing list