[clang-tidy] Fix readability-identifer-naming duplicating prefix or suffix for replac...
authorNathan James <n.james93@hotmail.co.uk>
Mon, 15 Mar 2021 14:20:47 +0000 (14:20 +0000)
committerNathan James <n.james93@hotmail.co.uk>
Mon, 15 Mar 2021 14:20:48 +0000 (14:20 +0000)
commit0333dde923c42219863f314d6c9fc0dcd352ef02
tree70b45e829237473924040d2b5f3f58124d3e8e97
parent74c270f33eb16d336b4ab834e18b27f8efcbabe8
[clang-tidy] Fix readability-identifer-naming duplicating prefix or suffix for replacements.

If a identifier has a correct prefix/suffix but a bad case, the fix won't strip them when computing the correct case, leading to duplication when the are added back.

Reviewed By: aaron.ballman

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