[flang-commits] [flang] [flang] Add parser support for Fortran 2023 conditional arguments (F2023 R1526-R1528) (PR #191303)
Vineet Kumar via flang-commits
flang-commits at lists.llvm.org
Tue Apr 21 09:03:21 PDT 2026
================
@@ -1739,6 +1739,30 @@ class UnparseVisitor {
void Unparse(const ActualArg::PercentVal &x) {
Word("%VAL("), Walk(x.v), Put(')');
}
+ void Unparse(const ConditionalArg &x) { // F2023 R1526
+ Put("( ");
+ Walk(std::get<ScalarLogicalExpr>(x.t));
+ Put(" ? ");
+ Walk(std::get<ConditionalArg::Consequent>(x.t));
+ Put(" : ");
+ Walk(std::get<common::Indirection<ConditionalArgTail>>(x.t));
----------------
vntkmr wrote:
That's a good idea! Done.
https://github.com/llvm/llvm-project/pull/191303
More information about the flang-commits
mailing list