================ @@ -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; + }); ---------------- paulwalker-arm wrote:
I don't think we need such complexity. Given all the variables exist you can just clear `ArgThatEnabledMathErrnoAfterVecLib` within the `OPT_fveclib` case block and then have ``` if (NoMathErrnoWasImpliedByVecLib && !ArgThatEnabledMathErrnoAfterVecLib && MathErrno) ArgThatEnabledMathErrnoAfterVecLib = A ``` just before we claim `A` after the switch block. 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