[flang-commits] [flang] [Flang][Semantics] Fix crash on invalid function result declaration (PR #194648)

Eugene Epshteyn via flang-commits flang-commits at lists.llvm.org
Tue Apr 28 14:52:28 PDT 2026


================
@@ -498,6 +496,8 @@ class FuncResultStack {
     // Result symbol
     Symbol *resultSymbol{nullptr};
     bool inFunctionStmt{false}; // true between Pre/Post of FunctionStmt
+    bool completingType{
+        false}; // re-entrancy guard for CompleteFunctionResultType
----------------
eugeneepshteyn wrote:

Could you please move `// re-entrancy guard for CompleteFunctionResultType` to just before `completingType`, so that `bool completingType{false};` could be on one line?

(This may seem like a silly request, but when one tries to review lots of code, every unusually formatted change slows the brain down. :-)

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


More information about the flang-commits mailing list