This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Diagnostics] Don't print note source line if it is the same as the previous diagnostic
ClosedPublic

Authored by rriddle on Mar 25 2020, 10:45 AM.

Details

Summary

This revision updates the SourceMgrDiagnosticHandler to not print the source location of a note if it is the same location as the previously printed diagnostic. This helps avoid redundancy, and potential confusion, when looking at the diagnostic output.

Diff Detail

Event Timeline

rriddle created this revision.Mar 25 2020, 10:45 AM
mehdi_amini accepted this revision.Mar 25 2020, 10:49 AM

We don't have tests for the note emission?

mlir/include/mlir/IR/Diagnostics.h
551

Worth documenting it here?

This revision is now accepted and ready to land.Mar 25 2020, 10:49 AM
rriddle marked an inline comment as done.Mar 25 2020, 11:03 AM

We don't have tests for the note emission?

We don't have tests that check that a specific line of source code is printed. We have many tests for note emission.

mlir/include/mlir/IR/Diagnostics.h
551

When I originally wrote a comment it came out as redundant with the parameter name.

This revision was automatically updated to reflect the committed changes.