aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Semantics/resolve-names-utils.cpp
diff options
context:
space:
mode:
authorPeter Klausler <pklausler@nvidia.com>2021-11-26 13:26:50 -0800
committerPeter Klausler <pklausler@nvidia.com>2021-12-01 11:19:19 -0800
commit44bc97c834443c791eb476c9c96aa03b527a5a18 (patch)
tree62ff27f5a92249bf77a332d02eb90bf93523655f /flang/lib/Semantics/resolve-names-utils.cpp
parentb1bc627e7e9965e6ec15e106ee4b2c21f6c36923 (diff)
downloadllvm-44bc97c834443c791eb476c9c96aa03b527a5a18.zip
llvm-44bc97c834443c791eb476c9c96aa03b527a5a18.tar.gz
llvm-44bc97c834443c791eb476c9c96aa03b527a5a18.tar.bz2
[flang] Adjust names in Semantics that imply too much (NFC)
Some kinds of Fortran arrays are declared with the same syntax, and it is impossible to tell from a shape (:, :) or (*) whether the object is assumed shape, deferred shape, assumed size, implied shape, or whatever without recourse to more information about the symbol in question. This patch softens the names of some predicate functions (IsAssumedShape to CanBeAssumedShape) and makes others more reflective of the syntax they represent (isAssumed to isStar) in an attempt to encourage coders to seek and find definitive predicate functions whose names deliver what they seem to mean. Address TODO comments in IsSimplyContiguous() by using the updated IsAssumedShape() predicate. Differential Revision: https://reviews.llvm.org/D114829
Diffstat (limited to 'flang/lib/Semantics/resolve-names-utils.cpp')
-rw-r--r--flang/lib/Semantics/resolve-names-utils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/flang/lib/Semantics/resolve-names-utils.cpp b/flang/lib/Semantics/resolve-names-utils.cpp
index ea02317..fd3af9b 100644
--- a/flang/lib/Semantics/resolve-names-utils.cpp
+++ b/flang/lib/Semantics/resolve-names-utils.cpp
@@ -303,7 +303,7 @@ ArraySpec ArraySpecAnalyzer::Analyze(const parser::CoarraySpec &x) {
}
void ArraySpecAnalyzer::Analyze(const parser::AssumedShapeSpec &x) {
- arraySpec_.push_back(ShapeSpec::MakeAssumed(GetBound(x.v)));
+ arraySpec_.push_back(ShapeSpec::MakeAssumedShape(GetBound(x.v)));
}
void ArraySpecAnalyzer::Analyze(const parser::ExplicitShapeSpec &x) {
MakeExplicit(std::get<std::optional<parser::SpecificationExpr>>(x.t),