aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Semantics/pointer-assignment.cpp
diff options
context:
space:
mode:
authorpeter klausler <pklausler@nvidia.com>2021-06-03 15:48:16 -0700
committerpeter klausler <pklausler@nvidia.com>2021-06-04 11:19:14 -0700
commitdfecbcae0d6434fa1daafe66ba5d90f816d4268b (patch)
treef51981b8bfce75c72b7d7715eef17aadc6dc2e93 /flang/lib/Semantics/pointer-assignment.cpp
parentffde966cd9bfd3f5aeb7bb26e8c0b8e71ec14899 (diff)
downloadllvm-dfecbcae0d6434fa1daafe66ba5d90f816d4268b.zip
llvm-dfecbcae0d6434fa1daafe66ba5d90f816d4268b.tar.gz
llvm-dfecbcae0d6434fa1daafe66ba5d90f816d4268b.tar.bz2
[flang] CheckConformance: tristate-ify result
To ensure that errors are emitted by CheckConformance and its callers in all situations, it's necessary for the returned result of that function to distinguish between three possible outcomes: the arrays are known to conform at compilation time, the arrays are known to not conform (and a message has been produced), and an indeterminate result in which is not possible to determine conformance. So convert CheckConformance's result into an optional<bool>, and convert its confusing Boolean flag arguments into a bit-set of named flags too. Differential Revision: https://reviews.llvm.org/D103654
Diffstat (limited to 'flang/lib/Semantics/pointer-assignment.cpp')
-rw-r--r--flang/lib/Semantics/pointer-assignment.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/flang/lib/Semantics/pointer-assignment.cpp b/flang/lib/Semantics/pointer-assignment.cpp
index 8cf46f5..171e2ba 100644
--- a/flang/lib/Semantics/pointer-assignment.cpp
+++ b/flang/lib/Semantics/pointer-assignment.cpp
@@ -171,7 +171,7 @@ bool PointerAssignmentChecker::Check(const evaluate::FunctionRef<T> &f) {
CHECK(frTypeAndShape);
if (!lhsType_->IsCompatibleWith(context_.messages(), *frTypeAndShape,
"pointer", "function result", false /*elemental*/,
- true /*left: deferred shape*/, true /*right: deferred shape*/)) {
+ evaluate::CheckConformanceFlags::BothDeferredShape)) {
msg = "%s is associated with the result of a reference to function '%s'"
" whose pointer result has an incompatible type or shape"_err_en_US;
}