[flang-commits] [flang] 119b9cd - [flang][omp] Heed valid build warning (#88015)
via flang-commits
flang-commits at lists.llvm.org
Mon Apr 8 14:01:17 PDT 2024
Author: Peter Klausler
Date: 2024-04-08T14:01:13-07:00
New Revision: 119b9cdb388f33e78fbb2a73e244ec3031c7f84c
URL: https://github.com/llvm/llvm-project/commit/119b9cdb388f33e78fbb2a73e244ec3031c7f84c
DIFF: https://github.com/llvm/llvm-project/commit/119b9cdb388f33e78fbb2a73e244ec3031c7f84c.diff
LOG: [flang][omp] Heed valid build warning (#88015)
Address a bug found by a compiler warning, and thereby also fix -Werror
builds.
Added:
Modified:
flang/lib/Lower/OpenMP/ReductionProcessor.h
Removed:
################################################################################
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