[flang-commits] [PATCH] D123710: [flang] Improve appearance of message attachments

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Wed Apr 13 12:33:14 PDT 2022


klausler created this revision.
klausler added a reviewer: vdonaldson.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
Herald added a project: All.
klausler requested review of this revision.

Error messages can have a list of attachments; these are used to point
to related source locations, supply additional information, and to
encapsulate error messages that were *not* emitted in a given context
to explain why a warning was justified.

This patch adds a message severity ("Because") for that last case,
and extends to AttachTo() API to provide a means for overriding
the severity of an attached message.

Some existing message attachments had their severities adjusted,
now that we're printing them.  And operator==() for Message was
cleaned up while debugging after I noticed that it was recursively
O(N**2) and subject to returning a false positive.


https://reviews.llvm.org/D123710

Files:
  flang/include/flang/Parser/message.h
  flang/lib/Parser/message.cpp
  flang/lib/Semantics/check-call.cpp
  flang/lib/Semantics/check-select-rank.cpp
  flang/lib/Semantics/expression.cpp
  flang/lib/Semantics/resolve-names.cpp
  flang/test/Semantics/call25.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123710.422600.patch
Type: text/x-patch
Size: 10636 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220413/62f2366f/attachment.bin>


More information about the flang-commits mailing list