This is an archive of the discontinued LLVM Phabricator instance.

[flang] Improve appearance of message attachments
ClosedPublic

Authored by klausler on Apr 13 2022, 12:33 PM.

Details

Summary

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.

Diff Detail

Event Timeline

klausler created this revision.Apr 13 2022, 12:33 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2022, 12:33 PM
Herald added a subscriber: jdoerfert. · View Herald Transcript
klausler requested review of this revision.Apr 13 2022, 12:33 PM
vdonaldson accepted this revision.Apr 13 2022, 2:21 PM
This revision is now accepted and ready to land.Apr 13 2022, 2:21 PM
klausler updated this revision to Diff 422744.Apr 13 2022, 9:53 PM

Replace a call to "common::visit()" with the "std::visit()" used in llvm.

This revision was automatically updated to reflect the committed changes.