[flang-commits] [flang] [Flang] Reject keyword arguments in statement function calls (PR #198610)

Eugene Epshteyn via flang-commits flang-commits at lists.llvm.org
Wed May 27 07:51:31 PDT 2026


================
@@ -3769,6 +3769,10 @@ std::optional<characteristics::Procedure> ExpressionAnalyzer::CheckCall(
   bool treatExternalAsImplicit{
       IsExternalCalledImplicitly(callSite, proc.GetSymbol())};
   const Symbol *procSymbol{proc.GetSymbol()};
+  // Statement functions have implicit interfaces and require the same checks
+  bool isStatementFunction{procSymbol &&
+      procSymbol->has<semantics::SubprogramDetails>() &&
+      procSymbol->get<semantics::SubprogramDetails>().stmtFunction()};
----------------
eugeneepshteyn wrote:

I think a canonical way to do this would be `procSymbol>flags().test(Symbol::Flag::StmtFunction)`

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


More information about the flang-commits mailing list