[flang-commits] [flang] [flang] Implement conditional expressions parser/semantics (F2023) (PR #186489)
Caroline Newcombe via flang-commits
flang-commits at lists.llvm.org
Wed Apr 1 08:10:03 PDT 2026
================
@@ -1736,6 +1729,18 @@ struct ArgumentExtractor
return {operation::OperationCode(x), {AsSomeExpr(x)}};
}
+ template <typename T> Result operator()(const ConditionalExpr<T> &x) const {
+ // ConditionalExpr is a top-level operation; collect its immediate operands
+ Arguments args{AsSomeExpr(x.condition()), AsSomeExpr(x.thenValue())};
+ if (const auto *nested{std::get_if<ConditionalExpr<T>>(&x.elseValue().u)}) {
----------------
cenewcombe wrote:
Okay, I have fixed the comment.
https://github.com/llvm/llvm-project/pull/186489
More information about the flang-commits
mailing list