This is an archive of the discontinued LLVM Phabricator instance.

[clang] Fix incorrect call to TextDiagnostic::printDiagnosticMessage
ClosedPublic

Authored by awarzynski on Sep 17 2020, 1:10 AM.

Details

Summary

As per the documentation, the 2nd argument in printDiagnosticMessage
should be a bool that specifies whether the underlying message is a
continuation note diagnostic or not. More specifically, it should be:

Level == DiagnosticsEngine::Note

instead of:

Level

This change means that no input file in the following scenario will be
now correctly printed in bold:

$ bin/clang
clang: error: no input files

In terminals that don't support text formatting the behaviour doesn't
change.

Diff Detail

Event Timeline

awarzynski created this revision.Sep 17 2020, 1:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 17 2020, 1:10 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
awarzynski requested review of this revision.Sep 17 2020, 1:10 AM
sanwou01 accepted this revision.Sep 17 2020, 1:42 AM

LGTM, thanks for fixing this! Could you wait a day or two before committing to allow others to comment?

This revision is now accepted and ready to land.Sep 17 2020, 1:42 AM

Thanks for reviewing @sanwou01 ! No new comments, so I'll submit as is.