[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
Mon Apr 13 08:09:41 PDT 2026


================
@@ -510,15 +510,34 @@ TYPE_PARSER(construct<ProcedureDesignator>(Parser<ProcComponentRef>{}) ||
 TYPE_PARSER(construct<ActualArgSpec>(
     maybe(keyword / "=" / !"="_ch), Parser<ActualArg>{}))
 
+// F2023 R1527 consequent -> consequent-arg | .NIL.
+// F2023 R1528 consequent-arg -> expr | variable
+// N.B. "variable" is subsumed by "expr" in the parser;
+// semantics determines the distinction.
+constexpr auto Consequent{
----------------
vntkmr wrote:

I think it should be. Upper case is consistent with the [LLVM coding standards for variable names](https://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly) but given that all other variables in the file are lowercased it makes sense to keep it should be consistent. 

https://github.com/llvm/llvm-project/pull/191303


More information about the flang-commits mailing list