From c140c1e674ed115d6dbd50c61a750b64d3ef33cc Mon Sep 17 00:00:00 2001 From: peter klausler Date: Mon, 1 Jul 2019 13:54:34 -0700 Subject: [PATCH] [flang] clean up for review Original-commit: flang-compiler/f18@9bf94ea39c33be8136ee0c0dd832e382bcd76907 Reviewed-on: https://github.com/flang-compiler/f18/pull/538 Tree-same-pre-rewrite: false --- flang/lib/evaluate/variable.cc | 4 ++-- flang/lib/semantics/expression.cc | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/flang/lib/evaluate/variable.cc b/flang/lib/evaluate/variable.cc index 825441d..9b868e6 100644 --- a/flang/lib/evaluate/variable.cc +++ b/flang/lib/evaluate/variable.cc @@ -319,8 +319,8 @@ template Expr Designator::LEN() const { } Expr ProcedureDesignator::LEN() const { - // TODO pmk: this needs more thought for assumed-length - // character functions, &c. + // TODO: this needs more thought for assumed-length + // character functions, intrinsics, &c. return std::visit( common::visitors{ [](const Symbol *s) { return SymbolLEN(*s); }, diff --git a/flang/lib/semantics/expression.cc b/flang/lib/semantics/expression.cc index d394c1b..9b8bb4c 100644 --- a/flang/lib/semantics/expression.cc +++ b/flang/lib/semantics/expression.cc @@ -1652,8 +1652,9 @@ MaybeExpr ExpressionAnalyzer::Analyze(const parser::Expr::PercentLoc &x) { // Use the actual source for the name of the call for error reporting. if (MaybeExpr arg{Analyze(x.v.value())}) { parser::CharBlock at{GetContextualMessages().at()}; - CHECK(at[0] == '%'); - parser::CharBlock loc{at.begin() + 1, at.end()}; + CHECK(at.size() >= 4); + parser::CharBlock loc{at.begin() + 1, 3}; + CHECK(loc == "loc"); return MakeFunctionRef( loc, ActualArguments{ActualArgument{std::move(*arg)}}); } -- 2.7.4