This patch removes " [check-name]" from the end of
ClangTidyMessage::Message. The " [check-name]" part is only appended when
printing diagnostics on the console. Clang errors are now marked with
"clang-diagnostic-error" check name, remarks and unknown warnings are marked
with "clang-diagnostic-unknown".
Details
Diff Detail
Event Timeline
Added a comment.
clang-tidy/ClangTidyDiagnosticConsumer.cpp | ||
---|---|---|
278 | Context.getCheckName returns non-empty string iff the diagnostic was generated using Context.diag, i.e. for all clang-tidy diagnostics. Compiler diagnostics may have warning option, which will be returned by getWarningOptionForDiag. If a compiler diagnostic doesn't have a warning option, CheckName remains empty. This is (almost?) always true for compiler errors (except for the ones mapped with -Werror). I've added a comment to the code to clarify this a bit. | |
298 | Done. |
So, this is true if Context.getCheckName(Info.getID()) returns "", right? In which cases does this happen?