[flang-commits] [flang] [flang][omp] Heed valid build warning (PR #88015)
Peter Klausler via flang-commits
flang-commits at lists.llvm.org
Mon Apr 8 10:17:35 PDT 2024
https://github.com/klausler created https://github.com/llvm/llvm-project/pull/88015
Address a bug found by a compiler warning, and thereby also fix -Werror builds.
>From ad401a13ddcbf022983db51183f8e14adf5c7c93 Mon Sep 17 00:00:00 2001
From: Peter Klausler <pklausler at nvidia.com>
Date: Mon, 8 Apr 2024 10:15:09 -0700
Subject: [PATCH] [flang][omp] Heed valid build warning
Address a bug found by a compiler warning, and thereby also
fix -Werror builds.
---
flang/lib/Lower/OpenMP/ReductionProcessor.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/flang/lib/Lower/OpenMP/ReductionProcessor.h b/flang/lib/Lower/OpenMP/ReductionProcessor.h
index 7ea252fde3602e..8b116a4c520411 100644
--- a/flang/lib/Lower/OpenMP/ReductionProcessor.h
+++ b/flang/lib/Lower/OpenMP/ReductionProcessor.h
@@ -151,9 +151,8 @@ mlir::Value
ReductionProcessor::getReductionOperation(fir::FirOpBuilder &builder,
mlir::Type type, mlir::Location loc,
mlir::Value op1, mlir::Value op2) {
- assert(type.isIntOrIndexOrFloat() ||
- fir::isa_complex(type) &&
- "only integer, float and complex types are currently supported");
+ assert((type.isIntOrIndexOrFloat() || fir::isa_complex(type)) &&
+ "only integer, float and complex types are currently supported");
if (type.isIntOrIndex())
return builder.create<IntegerOp>(loc, op1, op2);
if (fir::isa_real(type))
More information about the flang-commits
mailing list