This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] RenamerClangTidy group redecls into 1 warning.
ClosedPublic

Authored by njames93 on Jun 17 2020, 3:35 PM.

Details

Summary

This changes the behavious of RenamerClangTidyCheck based checks by grouping declarations of the same thing into 1 warning where it is first declared.
This cleans up clang-tidy output and prevents issues where 1 fix-it couldn't be applied, yet all other warnings(and fix-its) for the same declaration would be applied.
The old behaviour of forward declaring a class without defining it isn't affected, i.e. no warnings will be emitted for that case.

Diff Detail

Event Timeline

njames93 created this revision.Jun 17 2020, 3:35 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 17 2020, 3:35 PM
njames93 updated this revision to Diff 271509.Jun 17 2020, 3:44 PM

New line...

Harbormaster completed remote builds in B60726: Diff 271509.
aaron.ballman accepted this revision.Jun 18 2020, 6:43 AM

LGTM!

clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp
379

No need to introduce a new local scope here (there's no RAII for it to matter).

This revision is now accepted and ready to land.Jun 18 2020, 6:43 AM
This revision was automatically updated to reflect the committed changes.