[flang-commits] [PATCH] D103567: [flang] Fix crashes due to failure to find a subprogram

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Thu Jun 3 10:51:40 PDT 2021


klausler added inline comments.


================
Comment at: flang/lib/Semantics/tools.cpp:85
+    return nullptr;
+  } else {
+    const Scope &scope{GetProgramUnitContaining(start)};
----------------
awarzynski wrote:
> As pointed out by `clang-tidy`, you can skip `else` here without changing the semantics: https://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return. 
We don't always follow that LLVM rule in the more functional style used in f18.  This whole function is essentially one big expression that would be a single `return` statement if C++ could handle it.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103567/new/

https://reviews.llvm.org/D103567



More information about the flang-commits mailing list