[clang] [Driver] Introduce ffp-model=aggressive (PR #100453)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 24 12:51:04 PDT 2024
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 2e3ee31d2901bd1faeb57703992358130d5f2dcc cf7bf482e7ce11f0ca1add4b0bb62a327ac56b71 --extensions cpp,c -- clang/lib/Driver/ToolChain.cpp clang/lib/Driver/ToolChains/Clang.cpp clang/test/CodeGen/ffp-model.c clang/test/Driver/fp-model.c
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 41863eeea3..5c8d41e9cb 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -2904,12 +2904,11 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D,
// Warn if user expects to perform full implementation of complex
// multiplication or division in the presence of nan or ninf flags.
if (Range != NewRange)
- EmitComplexRangeDiag(
- D,
- !GccRangeComplexOption.empty()
- ? GccRangeComplexOption
- : ComplexArithmeticStr(Range),
- ComplexArithmeticStr(NewRange));
+ EmitComplexRangeDiag(D,
+ !GccRangeComplexOption.empty()
+ ? GccRangeComplexOption
+ : ComplexArithmeticStr(Range),
+ ComplexArithmeticStr(NewRange));
Range = NewRange;
SeenUnsafeMathModeOption = true;
};
@@ -3039,7 +3038,7 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D,
StringRef Val = A->getValue();
if (OFastEnabled && Val != "aggressive") {
- // Only -ffp-model=aggressive is compatible with OFast, ignore.
+ // Only -ffp-model=aggressive is compatible with OFast, ignore.
D.Diag(clang::diag::warn_drv_overriding_option)
<< Args.MakeArgString("-ffp-model=" + Val) << "-Ofast";
break;
``````````
</details>
https://github.com/llvm/llvm-project/pull/100453
More information about the cfe-commits
mailing list