[flang-commits] [flang] 666679a - [flang] Fix -Wunused-but-set-variable in lib/Evaluate
Fangrui Song via flang-commits
flang-commits at lists.llvm.org
Fri May 3 16:51:40 PDT 2024
Author: Fangrui Song
Date: 2024-05-03T16:51:35-07:00
New Revision: 666679a559128fa209e4b74224ee5de3eeff0e9c
URL: https://github.com/llvm/llvm-project/commit/666679a559128fa209e4b74224ee5de3eeff0e9c
DIFF: https://github.com/llvm/llvm-project/commit/666679a559128fa209e4b74224ee5de3eeff0e9c.diff
LOG: [flang] Fix -Wunused-but-set-variable in lib/Evaluate
Added:
Modified:
flang/lib/Evaluate/fold-real.cpp
Removed:
################################################################################
diff --git a/flang/lib/Evaluate/fold-real.cpp b/flang/lib/Evaluate/fold-real.cpp
index 1ccf3f979ecef2..238ce34adfb767 100644
--- a/flang/lib/Evaluate/fold-real.cpp
+++ b/flang/lib/Evaluate/fold-real.cpp
@@ -202,10 +202,10 @@ Expr<Type<TypeCategory::Real, KIND>> FoldIntrinsicFunction(
}
} else if (name == "abs") { // incl. zabs & cdabs
// Argument can be complex or real
- if (auto *x{UnwrapExpr<Expr<SomeReal>>(args[0])}) {
+ if (UnwrapExpr<Expr<SomeReal>>(args[0])) {
return FoldElementalIntrinsic<T, T>(
context, std::move(funcRef), &Scalar<T>::ABS);
- } else if (auto *z{UnwrapExpr<Expr<SomeComplex>>(args[0])}) {
+ } else if (UnwrapExpr<Expr<SomeComplex>>(args[0])) {
return FoldElementalIntrinsic<T, ComplexT>(context, std::move(funcRef),
ScalarFunc<T, ComplexT>([&name, &context](
const Scalar<ComplexT> &z) -> Scalar<T> {
More information about the flang-commits
mailing list