[PATCH] D78685: [flang] Add missing check for unresolved name
Tim Keith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 23 07:32:33 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG026d8807f439: [flang] Add missing check for unresolved name (authored by tskeith).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78685/new/
https://reviews.llvm.org/D78685
Files:
flang/lib/Semantics/check-io.cpp
Index: flang/lib/Semantics/check-io.cpp
===================================================================
--- flang/lib/Semantics/check-io.cpp
+++ flang/lib/Semantics/check-io.cpp
@@ -283,15 +283,17 @@
flags_.set(Flag::DataList);
if (const parser::Variable * var{std::get_if<parser::Variable>(&spec.u)}) {
const parser::Name &name{GetLastName(*var)};
- if (auto *details{name.symbol->detailsIf<ObjectEntityDetails>()}) {
- // TODO: Determine if this check is needed at all, and if so, replace
- // the false subcondition with a check for a whole array. Otherwise,
- // the check incorrectly flags array element and section references.
- if (details->IsAssumedSize() && false) {
- // This check may be superseded by C928 or C1002.
- context_.Say(name.source,
- "'%s' must not be a whole assumed size array"_err_en_US,
- name.source); // C1231
+ if (name.symbol) {
+ if (auto *details{name.symbol->detailsIf<ObjectEntityDetails>()}) {
+ // TODO: Determine if this check is needed at all, and if so, replace
+ // the false subcondition with a check for a whole array. Otherwise,
+ // the check incorrectly flags array element and section references.
+ if (details->IsAssumedSize() && false) {
+ // This check may be superseded by C928 or C1002.
+ context_.Say(name.source,
+ "'%s' must not be a whole assumed size array"_err_en_US,
+ name.source); // C1231
+ }
}
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78685.259564.patch
Type: text/x-patch
Size: 1540 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200423/8cc95121/attachment.bin>
More information about the llvm-commits
mailing list