This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Correct the include-cleaner-check diagnostic message for missing-includes.
ClosedPublic

Authored by hokein on Jun 15 2023, 4:52 AM.

Details

Summary

We should print the symbol name rather than the header name in the
message.

Diff Detail

Event Timeline

hokein created this revision.Jun 15 2023, 4:52 AM
hokein requested review of this revision.Jun 15 2023, 4:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2023, 4:52 AM
VitaNuo accepted this revision.Jun 15 2023, 6:03 AM

Thanks!

clang-tools-extra/clang-tidy/misc/IncludeCleanerCheck.cpp
49

Consider making the whole include_cleaner::SymbolReference a field instead, since you're already using two out of its three fields here.

This revision is now accepted and ready to land.Jun 15 2023, 6:03 AM
hokein updated this revision to Diff 531725.Jun 15 2023, 6:23 AM
hokein marked an inline comment as done.

address comments

This revision was landed with ongoing or failed builds.Jun 15 2023, 6:27 AM
This revision was automatically updated to reflect the committed changes.