[clang] [OpenACC][CIR] Fix transform inclusive scan init parameter (PR #161428)
Henrich Lauko via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 30 12:57:40 PDT 2025
https://github.com/xlauko created https://github.com/llvm/llvm-project/pull/161428
This fixes macos build, where otherwise the compilation yields an error: `no viable conversion from 'bool' to 'typename iterator_traits<const QualType *>::value_type`
>From 11e4d87092595c336689fc2883baf3f9ef1be2c0 Mon Sep 17 00:00:00 2001
From: xlauko <xlauko at mail.muni.cz>
Date: Tue, 30 Sep 2025 21:57:07 +0200
Subject: [PATCH] [OpenACC][CIR] Fix transform inclusive scan init parameter
This fixes macos build, where otherwise the compilation yields an error: `no viable conversion from 'bool' to 'typename iterator_traits<const QualType *>::value_type`
---
clang/lib/CIR/CodeGen/CIRGenOpenACCRecipe.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/CIR/CodeGen/CIRGenOpenACCRecipe.cpp b/clang/lib/CIR/CodeGen/CIRGenOpenACCRecipe.cpp
index e41c2d85fbd5d..fc28ac552224c 100644
--- a/clang/lib/CIR/CodeGen/CIRGenOpenACCRecipe.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenOpenACCRecipe.cpp
@@ -89,7 +89,7 @@ mlir::Value OpenACCRecipeBuilderBase::makeBoundsAlloca(
std::transform_inclusive_scan(
resultTypes.begin(), resultTypes.end(),
std::back_inserter(allocasLeftArr), std::plus<bool>{},
- [](QualType ty) { return !ty->isConstantArrayType(); });
+ [](QualType ty) { return !ty->isConstantArrayType(); }, false);
// Keep track of the number of 'elements' that we're allocating. Individual
// allocas should multiply this by the size of its current allocation.
More information about the cfe-commits
mailing list