This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Remark was added to clang tooling Diagnostic
ClosedPublic

Authored by ivanmurashko on May 21 2021, 1:48 AM.

Details

Summary

The diff adds Remark to Diagnostic::Level for clang tooling. That makes Remark diagnostic level ready to use in clang-tidy checks: the clang-diagnostic-module-import becomes visible as a part of the change

Test plan:

ninja check-clang
ninja check-clang-tools

Diff Detail

Event Timeline

ivanmurashko created this revision.May 21 2021, 1:48 AM
ivanmurashko requested review of this revision.May 21 2021, 1:48 AM
DmitryPolukhin added inline comments.May 21 2021, 3:23 AM
clang/include/clang/Tooling/Core/Diagnostic.h
73

nit, I would move remark first to have list by increasing severity. It looks like this enum values is not used outside of the sources so I hope it is safe.

aaron.ballman accepted this revision.May 22 2021, 7:39 AM

LGTM aside from the nit from @DmitryPolukhin

clang/include/clang/Tooling/Core/Diagnostic.h
73

We have diagnostic notes as well and it's not clear to me how to order remark and note should we go that way in the future. So I'm not opposed to the suggestion, but the order likely doesn't matter all that much.

This revision is now accepted and ready to land.May 22 2021, 7:39 AM

@DmitryPolukhin suggestion was applied

Thanks! Do you need someone to commit on your behalf? If so, what name and email address would you like used for patch attribution?

ivanmurashko marked an inline comment as done.EditedMay 24 2021, 8:16 AM

Hi @aaron.ballman

Thanks! Do you need someone to commit on your behalf?

I will appreciate your assistance in the diff landing.

If so, what name and email address would you like used for patch attribution?

It would be good to use mine - Ivan Murashko (ivan.murashko at gmail.com) for that

Note: I noticed some tests failed after rebase but they seem to be unrelated to my change and also failed on main branch

clang/include/clang/Tooling/Core/Diagnostic.h
73
aaron.ballman closed this revision.May 24 2021, 8:23 AM

Hi @aaron.ballman

Thanks! Do you need someone to commit on your behalf?

I will appreciate your assistance in the diff landing.

Thank you for the patch! I've landed on your behalf in 7f2f0247f855b143c12cd33d1f53d14bc63f3e82.