[all-commits] [llvm/llvm-project] a3538b: [flang] Improve error messages for procedures in e...
Tim Keith via All-commits
all-commits at lists.llvm.org
Tue Aug 18 10:48:32 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: a3538b83943f640865b92e947da0d5ef5bdc930b
https://github.com/llvm/llvm-project/commit/a3538b83943f640865b92e947da0d5ef5bdc930b
Author: Tim Keith <tkeith at nvidia.com>
Date: 2020-08-18 (Tue, 18 Aug 2020)
Changed paths:
M flang/include/flang/Evaluate/tools.h
M flang/lib/Evaluate/tools.cpp
M flang/lib/Semantics/expression.cpp
M flang/test/Semantics/assign04.f90
M flang/test/Semantics/resolve63.f90
Log Message:
-----------
[flang] Improve error messages for procedures in expressions
When a procedure name was used on the RHS of an assignment we were not
reporting the error. When one was used in an expression the error
message wasn't very good (e.g. "Operands of + must be numeric; have
INTEGER(4) and untyped").
Detect these cases in ArgumentAnalyzer and emit better messages,
depending on whether the named procedure is a function or subroutine.
Procedure names may appear as actual arguments to function and
subroutine calls so don't report errors in those cases. That is the same
case where assumed type arguments are allowed, so rename `isAssumedType_`
to `isProcedureCall_` and use that to decide if it is an error.
Differential Revision: https://reviews.llvm.org/D86107
More information about the All-commits
mailing list