[flang-commits] [flang] 307409a - [flang] Fix warning fix
David Spickett via flang-commits
flang-commits at lists.llvm.org
Thu Feb 22 07:01:29 PST 2024
Author: David Spickett
Date: 2024-02-22T15:00:12Z
New Revision: 307409a8872ff27339d5d5c6a7e7777254972f34
URL: https://github.com/llvm/llvm-project/commit/307409a8872ff27339d5d5c6a7e7777254972f34
DIFF: https://github.com/llvm/llvm-project/commit/307409a8872ff27339d5d5c6a7e7777254972f34.diff
LOG: [flang] Fix warning fix
This fixes 73c646a3b27293f8cb4ba120de7bc01c223b4b5f.
I misread the #ifdefs and didn't realise that they were in
the middle of passing parameters to a function.
Move the workaround outside this.
Added:
Modified:
flang/lib/Evaluate/fold-integer.cpp
Removed:
################################################################################
diff --git a/flang/lib/Evaluate/fold-integer.cpp b/flang/lib/Evaluate/fold-integer.cpp
index 09b2f91debda29..25ae4831ab2086 100644
--- a/flang/lib/Evaluate/fold-integer.cpp
+++ b/flang/lib/Evaluate/fold-integer.cpp
@@ -704,6 +704,7 @@ Expr<Type<TypeCategory::Integer, KIND>> FoldIntrinsicFunction(
return common::visit(
[&funcRef, &context, &FromInt64](const auto &str) -> Expr<T> {
using Char = typename std::decay_t<decltype(str)>::Result;
+ (void)FromInt64;
return FoldElementalIntrinsic<T, Char>(context,
std::move(funcRef),
ScalarFunc<T, Char>(
@@ -719,7 +720,6 @@ Expr<Type<TypeCategory::Integer, KIND>> FoldIntrinsicFunction(
// CharacterUtils<2>::ICHAR(). Can't find a work-around,
// so remove the FromInt64 error checking lambda that
// seems to have caused the proble.
- (void)FromInt64;
[](const Scalar<Char> &c) {
return CharacterUtils<Char::kind>::ICHAR(
CharacterUtils<Char::kind>::Resize(c, 1));
More information about the flang-commits
mailing list