Skip to content

Commit 307409a

Browse files
committed
[flang] Fix warning fix
This fixes 73c646a. 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.
1 parent 8e28037 commit 307409a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flang/lib/Evaluate/fold-integer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,7 @@ Expr<Type<TypeCategory::Integer, KIND>> FoldIntrinsicFunction(
704704
return common::visit(
705705
[&funcRef, &context, &FromInt64](const auto &str) -> Expr<T> {
706706
using Char = typename std::decay_t<decltype(str)>::Result;
707+
(void)FromInt64;
707708
return FoldElementalIntrinsic<T, Char>(context,
708709
std::move(funcRef),
709710
ScalarFunc<T, Char>(
@@ -719,7 +720,6 @@ Expr<Type<TypeCategory::Integer, KIND>> FoldIntrinsicFunction(
719720
// CharacterUtils<2>::ICHAR(). Can't find a work-around,
720721
// so remove the FromInt64 error checking lambda that
721722
// seems to have caused the proble.
722-
(void)FromInt64;
723723
[](const Scalar<Char> &c) {
724724
return CharacterUtils<Char::kind>::ICHAR(
725725
CharacterUtils<Char::kind>::Resize(c, 1));

0 commit comments

Comments
 (0)