[flang-commits] [PATCH] D87073: [flang]Fix for PR47339

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Thu Sep 3 07:54:14 PDT 2020


klausler added inline comments.


================
Comment at: flang/lib/Semantics/resolve-names.cpp:5049
+    const MaybeExpr *pexpr{&details.expr()};
+    if (!*pexpr) {
+      pexpr = &GetCurrentAssociation().selector.expr;
----------------
If `details.expr()` is vacant, so will `GetCurrentAssociation().selector.expr` be, yes?  I think that you can use one or the other.  This would be shorter:

```
if (ExtractCoarrayRef(GetCurrentAssociation().selector.expr)) { // C1103
  Say(...);
}
```


================
Comment at: flang/lib/Semantics/resolve-names.cpp:5054
+      const SomeExpr &expr{**pexpr};
+      if (std::optional<evaluate::DynamicType> type{expr.GetType()}) {
+        if (ExtractCoarrayRef(expr)) { // C1103
----------------
`type` is unused


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

https://reviews.llvm.org/D87073



More information about the flang-commits mailing list