[clang-tidy] RenamerClangTidy group redecls into 1 warning.
authorNathan James <n.james93@hotmail.co.uk>
Thu, 18 Jun 2020 14:50:15 +0000 (15:50 +0100)
committerNathan James <n.james93@hotmail.co.uk>
Thu, 18 Jun 2020 14:50:16 +0000 (15:50 +0100)
commit850bb889a56ccf3252792c6d3db59542e94753ae
tree7b6a129c6c1940f0fd8cc1863f9a7931b8034788
parent243303f8d7952b5928659af8079949bb89fcabf2
[clang-tidy] RenamerClangTidy group redecls into 1 warning.

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.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D82059
clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp
clang-tools-extra/test/clang-tidy/checkers/readability-identifier-naming.cpp