[PATCH] D87341: [flang] Fix check for distinguishable operators/assignments

Tim Keith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 8 18:01:36 PDT 2020


tskeith created this revision.
tskeith added reviewers: klausler, PeteSteinfeld, sscalpone.
tskeith added a project: Flang.
Herald added a reviewer: jdoerfert.
Herald added a reviewer: DavidTruby.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
tskeith requested review of this revision.

Change how generic operators and assignments are checked for
distinguishable procedures. Because of how they are invoked, available
type-bound generics and normal generics all have to be considered
together. This is different from how generic names are checked.

Move common part of checking into DistinguishabilityHelper so that it
can be used in both cases after the appropriate procedures have been
added.

Cache result of Procedure::Characterize(Symbol) in a map in
CheckHelper so that we don't have to worry about passing the
characterized Procedures around or the cost of recomputing them.

Add MakeOpName() to construct names for defined operators and assignment
for using in error messages. This eliminates the need for different
messages in those cases.

Add missing check that procedures for defined operators are functions
and that their dummy arguments are INTENT(IN) or VALUE.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D87341

Files:
  flang/include/flang/Semantics/tools.h
  flang/lib/Semantics/check-declarations.cpp
  flang/lib/Semantics/resolve-names-utils.cpp
  flang/lib/Semantics/resolve-names-utils.h
  flang/lib/Semantics/resolve-names.cpp
  flang/lib/Semantics/tools.cpp
  flang/test/Semantics/resolve11.f90
  flang/test/Semantics/resolve13.f90
  flang/test/Semantics/resolve15.f90
  flang/test/Semantics/resolve25.f90
  flang/test/Semantics/resolve53.f90
  flang/test/Semantics/resolve95.f90
  flang/test/Semantics/test_errors.sh

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87341.290623.patch
Type: text/x-patch
Size: 32669 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200909/418f4780/attachment-0001.bin>


More information about the llvm-commits mailing list