[flang-commits] [flang] [flang] Implement conditional expressions parser/semantics (F2023) (PR #186489)
Eugene Epshteyn via flang-commits
flang-commits at lists.llvm.org
Sun Mar 29 19:00:51 PDT 2026
================
@@ -1901,6 +1908,11 @@ struct ConvertCollector
}
}
+ template <typename T> Result operator()(const ConditionalExpr<T> &x) const {
+ // For conditional expressions, collect conversions from all values only
+ return Combine((*this)(x.thenValue()), (*this)(x.elseValue()));
----------------
eugeneepshteyn wrote:
Why not also use `x.condition()` here as in `Combine((*this)(x.condition()), Combine((*this)(x.thenValue()), (*this)(x.elseValue())));` ?
https://github.com/llvm/llvm-project/pull/186489
More information about the flang-commits
mailing list