[PATCH] D84452: [flang] Implicitly convert result of statement function

Peter Klausler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 11:51:18 PDT 2020


klausler accepted this revision.
klausler added inline comments.
This revision is now accepted and ready to land.


================
Comment at: flang/lib/Semantics/resolve-names.cpp:6119
+// Analyze the bodies of statement functions now that the symbol in this
+// specification part have been fully declared and implicitly typed.
+void ResolveNamesVisitor::AnalyzeStmtFunctionStmt(
----------------
Singular/plural conflict here in comment ("the symbol" vs. "have").


================
Comment at: flang/lib/Semantics/resolve-names.cpp:6134
+  if (auto type{evaluate::DynamicType::From(*symbol)};
+      type && type != expr->GetType()) {
+    auto converted{ConvertToType(*type, std::move(*expr))};
----------------
`ConvertToType()` should do the right thing (nothing) if the types already match, so maybe you can simplify that `if` predicate.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84452





More information about the llvm-commits mailing list