From 17f5b8b52a3552de1143efb42af6a94d47d8c7fd Mon Sep 17 00:00:00 2001 From: Andre Kuhlenschmidt Date: Wed, 18 Jun 2025 11:21:35 -0700 Subject: [flang][driver] add ability to look up feature flags without setting them (#144559) This just adds some convenience methods to feature control and rewrites old code in terms of those methods. Also cleans up some names that I just realize were overloads of another method. --- flang/lib/Frontend/CompilerInvocation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'flang/lib/Frontend/CompilerInvocation.cpp') diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp index 147849b..2603a3f 100644 --- a/flang/lib/Frontend/CompilerInvocation.cpp +++ b/flang/lib/Frontend/CompilerInvocation.cpp @@ -1011,7 +1011,7 @@ static bool parseDiagArgs(CompilerInvocation &res, llvm::opt::ArgList &args, if (wArg == "error") { res.setWarnAsErr(true); // -W(no-) - } else if (!features.ApplyCliOption(wArg)) { + } else if (!features.EnableWarning(wArg)) { const unsigned diagID = diags.getCustomDiagID( clang::DiagnosticsEngine::Error, "Unknown diagnostic option: -W%0"); diags.Report(diagID) << wArg; -- cgit v1.1