================
@@ -2960,6 +2969,12 @@ static void RenderFloatingPointOptions(const ToolChain 
&TC, const Driver &D,
   }
 
   for (const Arg *A : Args) {
+    auto CheckMathErrnoForVecLib =
+        llvm::make_scope_exit([&, MathErrnoBeforeArg = MathErrno] {
+          if (NoMathErrnoWasImpliedByVecLib && !MathErrnoBeforeArg && 
MathErrno)
+            ArgThatEnabledMathErrnoAfterVecLib = A;
+        });
----------------
MacDue wrote:

Maybe a little contrived, but the suggested check will give a _kinda_ incorrect 
warning in some cases:

Given this (somewhat) contrived example:
`-fveclib=ArmPL -fno-fast-math -fno-math-errno -ffp-model=strict`

The current check will warn about `-ffp-model=strict` which is the option that 
in the end turns on `-fmath-errno`, the suggested check will warn about 
`-fno-fast-math`, which is not really correct as there's `-fno-math-errno` 
after it.

https://github.com/llvm/llvm-project/pull/112580
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to