[flang-commits] [flang] [Flang] Fold complex ** (1, 0) to identity in constant folding (PR #213256)
via flang-commits
flang-commits at lists.llvm.org
Fri Jul 31 05:00:53 PDT 2026
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 origin/main HEAD --extensions h -- flang/lib/Evaluate/fold-implementation.h --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/lib/Evaluate/fold-implementation.h b/flang/lib/Evaluate/fold-implementation.h
index 7c1761ef3..1fa36f20e 100644
--- a/flang/lib/Evaluate/fold-implementation.h
+++ b/flang/lib/Evaluate/fold-implementation.h
@@ -2222,8 +2222,7 @@ Expr<T> FoldOperation(FoldingContext &context, Divide<T> &&x) {
return Expr<T>{std::move(x)};
}
-template <typename T>
-bool IsComplexUnity(const typename T::Scalar &z) {
+template <typename T> bool IsComplexUnity(const typename T::Scalar &z) {
static_assert(T::category == TypeCategory::Complex);
using Part = typename T::Part::Scalar;
auto one{Part::FromInteger(value::Integer<8>{1}).value};
``````````
</details>
https://github.com/llvm/llvm-project/pull/213256
More information about the flang-commits
mailing list