Skip to content
Commit 3d77768e authored by Alexander Kornienko's avatar Alexander Kornienko
Browse files

[clang-tidy] Code factorization and cleanup in IdentifierNamingCheck

This is to level the ground a little bit, in preparation for the changes in http://reviews.llvm.org/D13081.

Code factorization replaces all insertions to NamingCheckFailures map with a unique addUsage function that does the job.
There is also no more difference between the declaration and the references to a given identifier, both cases are treated as ranges in the Usage vector. There is also a check to avoid duplicated ranges to be inserted, which sometimes triggered erroneous replacements.

References can now also be added before the declaration of the identifier is actually found; this looks to be the case for example when a templated class uses its parameters to specialize its templated base class.

Patch by Beren Minor!

Differential revision: http://reviews.llvm.org/D13079

llvm-svn: 248700
parent 501e6cd2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment