[flang-commits] [flang] ec8c8b6 - [Flang] Remove constexpr from isMax variable. NFC
David Green via flang-commits
flang-commits at lists.llvm.org
Mon Jan 29 04:33:38 PST 2024
Author: David Green
Date: 2024-01-29T12:33:32Z
New Revision: ec8c8b6487d53b2c3222f1a2f8968e754b070912
URL: https://github.com/llvm/llvm-project/commit/ec8c8b6487d53b2c3222f1a2f8968e754b070912
DIFF: https://github.com/llvm/llvm-project/commit/ec8c8b6487d53b2c3222f1a2f8968e754b070912.diff
LOG: [Flang] Remove constexpr from isMax variable. NFC
The MSCV build doesn't allow the constexpr isMax variable to be used in lambda
without a capture. The -Weverything build does not allow isMax to be used in a
lambda capture as it is a constexpr. I've removed the constexpr as it shouldn't
be necessary.
Added:
Modified:
flang/lib/Optimizer/HLFIR/Transforms/OptimizedBufferization.cpp
Removed:
################################################################################
diff --git a/flang/lib/Optimizer/HLFIR/Transforms/OptimizedBufferization.cpp b/flang/lib/Optimizer/HLFIR/Transforms/OptimizedBufferization.cpp
index eb6434b2746631a..b1165a5ee193953 100644
--- a/flang/lib/Optimizer/HLFIR/Transforms/OptimizedBufferization.cpp
+++ b/flang/lib/Optimizer/HLFIR/Transforms/OptimizedBufferization.cpp
@@ -823,7 +823,7 @@ class MinMaxlocElementalConversion : public mlir::OpRewritePattern<Op> {
return rewriter.notifyMatchFailure(mloc,
"Did not find valid minloc/maxloc");
- constexpr bool isMax = std::is_same_v<Op, hlfir::MaxlocOp>;
+ bool isMax = std::is_same_v<Op, hlfir::MaxlocOp>;
auto elemental =
mloc.getMask().template getDefiningOp<hlfir::ElementalOp>();
More information about the flang-commits
mailing list