Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
Showing
5 changed files
with
36 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters