[flang-commits] [flang] Fix compiler warning (PR #99306)

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Wed Jul 17 03:57:46 PDT 2024


https://github.com/tblah created https://github.com/llvm/llvm-project/pull/99306

None

>From 24f7451407dcd558a4b4092637af5172ff15422f Mon Sep 17 00:00:00 2001
From: Tom Eccles <tom.eccles at arm.com>
Date: Wed, 17 Jul 2024 10:54:40 +0000
Subject: [PATCH] Fix compiler warning

---
 flang/lib/Optimizer/Builder/IntrinsicCall.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/flang/lib/Optimizer/Builder/IntrinsicCall.cpp b/flang/lib/Optimizer/Builder/IntrinsicCall.cpp
index e12e21bb00e15..ba71fb3b4040c 100644
--- a/flang/lib/Optimizer/Builder/IntrinsicCall.cpp
+++ b/flang/lib/Optimizer/Builder/IntrinsicCall.cpp
@@ -6148,7 +6148,7 @@ IntrinsicLibrary::genScan(mlir::Type resultType,
 fir::ExtendedValue
 IntrinsicLibrary::genSecond(std::optional<mlir::Type> resultType,
                             mlir::ArrayRef<fir::ExtendedValue> args) {
-  assert(args.size() == 1 && !resultType || args.empty() && resultType);
+  assert((args.size() == 1 && !resultType) || (args.empty() && resultType));
 
   fir::ExtendedValue result;
 



More information about the flang-commits mailing list