llvm-project/clang-tools-extra/test/clang-tidy
Alexander Kornienko 3d77768e2a [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
2015-09-28 08:59:12 +00:00
..
Inputs Add NamingStyle option to modernize-loop-convert. 2015-09-24 17:02:19 +00:00
basic.cpp [clang-tidy] Move the missing namespace comment warnings to the closing brace 2014-11-17 17:32:32 +00:00
check_clang_tidy.py [clang-tidy] Fix minor issues in the testing script. 2015-09-11 22:38:26 +00:00
clang-tidy-diff.cpp [clang-tidy] Move misc-use-override and readability-shrink-to-fit to "modernize/" 2015-08-31 13:17:43 +00:00
config-files.cpp [clang-tidy] Don't ignore default set of checks when a config file is found. 2015-02-05 14:50:17 +00:00
deduplication.cpp [clang-tidy] Support initializer_list in google-explicit-constructor check 2014-11-27 11:11:47 +00:00
diagnostic.cpp [clang-tidy] Move misc-use-override and readability-shrink-to-fit to "modernize/" 2015-08-31 13:17:43 +00:00
file-filter.cpp Tweak clang-tools-extra/test/clang-tidy/file-filter.cpp to pass on win32. 2015-08-20 15:04:39 +00:00
fix-errors.cpp [clang-tidy] Added -fix-errors option 2014-11-03 14:06:31 +00:00
fix.cpp [clang-tidy] Add an option to export suggested fixes into a file. 2014-09-04 10:31:23 +00:00
google-build-explicit-make-pair.cpp [clang-tidy] Renamed tests files to be closer to the check names. 2015-09-10 10:58:38 +00:00
google-explicit-constructor.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
google-module.cpp [clang-tidy] Set google-readability-namespace-comments.ShortNamespaceLines to 10 2014-11-20 15:05:32 +00:00
google-namespaces.cpp [clang-tidy] Add namespaces checkers. 2014-07-16 14:16:56 +00:00
google-overloaded-unary-and.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
google-readability-casting.c [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
google-readability-casting.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
google-readability-namespace-comments.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
google-readability-todo.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
google-runtime-int-std.cpp [clang-tidy] Make google-runtime-int configurable. 2015-09-16 14:36:22 +00:00
google-runtime-int.c [clang-tidy] google-runtime-int: Don't check C code. 2014-12-08 11:17:25 +00:00
google-runtime-int.cpp [clang-tidy] google-runtime-int: made the matcher more restricting, added a test for a false positive 2015-09-16 15:08:46 +00:00
google-runtime-member-string-references.cpp [clang-tidy] Renamed tests files to be closer to the check names. 2015-09-10 10:58:38 +00:00
google-runtime-memset-zero-length.cpp [clang-tidy] Renamed tests files to be closer to the check names. 2015-09-10 10:58:38 +00:00
line-filter.cpp [clang-tidy] Support initializer_list in google-explicit-constructor check 2014-11-27 11:11:47 +00:00
llvm-include-order.cpp Remove garbage. The issue was fixed in r246856. 2015-09-15 14:01:09 +00:00
llvm-twine-local.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
macros.cpp [clang-tidy] Support initializer_list in google-explicit-constructor check 2014-11-27 11:11:47 +00:00
misc-argument-comment.cpp [clang-tidy] Renamed a test file to <check-name>.cpp. 2015-08-27 18:03:37 +00:00
misc-assert-side-effect.cpp [clang-tidy] misc-assert-side-effect: support assert macros defined through other macros 2015-08-31 14:47:14 +00:00
misc-assign-operator-signature.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
misc-bool-pointer-implicit-conversion.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
misc-inaccurate-erase.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
misc-inefficient-algorithm.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
misc-macro-parentheses.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
misc-move-constructor-init.cpp Change the test to use the new python script instead of the more verbose RUN line. 2015-08-20 19:21:07 +00:00
misc-noexcept-move-constructor.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
misc-repeated-side-effects-in-macro.c [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
misc-sizeof-container.cpp [clang-tidy] misc-sizeof-container: remove fix-it hints 2015-09-14 16:51:52 +00:00
misc-static-assert.c Allow the static assert clang-tidy checker to run over C code. 2015-08-31 21:54:42 +00:00
misc-static-assert.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
misc-swapped-arguments.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
misc-undelegated-constructor-cxx98.cpp Disable clang-tidy misc checkers when not compiling in C++ mode. Many of the checkers do not require additional testing as the tests will not compile for other languages or modes, or the checkers would never match a valid construct. 2015-08-28 19:27:19 +00:00
misc-undelegated-constructor.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
misc-uniqueptr-reset-release.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
misc-unused-alias-decls.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
misc-unused-parameters.c [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
misc-unused-parameters.cpp misc-unused-parameter: Ignore lambda static invokers. 2015-09-22 09:20:20 +00:00
misc-unused-raii.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
modernize-loop-convert-basic.cpp Add NamingStyle option to modernize-loop-convert. 2015-09-24 17:02:19 +00:00
modernize-loop-convert-camelback.cpp Add NamingStyle option to modernize-loop-convert. 2015-09-24 17:02:19 +00:00
modernize-loop-convert-extra.cpp Add NamingStyle option to modernize-loop-convert. 2015-09-24 17:02:19 +00:00
modernize-loop-convert-lowercase.cpp Add NamingStyle option to modernize-loop-convert. 2015-09-24 17:02:19 +00:00
modernize-loop-convert-negative.cpp Add NamingStyle option to modernize-loop-convert. 2015-09-24 17:02:19 +00:00
modernize-loop-convert-uppercase.cpp Add NamingStyle option to modernize-loop-convert. 2015-09-24 17:02:19 +00:00
modernize-loop-convert.c Disable several more clang-tidy modernize checkers when not compiling in C++ mode. Loop conversion would make recommendations for C code, so added a test to ensure that does not happen. The pass by value, use auto and replace auto_ptr checkers would not make recommendations for C code, and are disabled for performance reasons, but do not require an extra test. 2015-08-28 17:58:10 +00:00
modernize-pass-by-value.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
modernize-replace-auto-ptr.cpp Add replace-auto_ptr check. 2015-08-25 13:03:43 +00:00
modernize-shrink-to-fit.cpp [clang-tidy] Move misc-use-override and readability-shrink-to-fit to "modernize/" 2015-08-31 13:17:43 +00:00
modernize-use-auto-iterator.cpp [clang-tidy] Migrate UseAuto from clang-modernize to clang-tidy. 2015-08-21 15:08:51 +00:00
modernize-use-auto-new.cpp Fix use-auto-check. 2015-09-02 10:20:00 +00:00
modernize-use-nullptr-basic.cpp [clang-tidy] Documented the reason to run the test in C++98 mode. 2015-08-27 23:43:39 +00:00
modernize-use-nullptr.c Reapplying r246209, which exposed language options to the checkers. This time disable UseNullptrCheck when not compiling in C++ mode, but still allow in C++11 mode since it's likely the user wishes to modernize their code. 2015-08-28 13:20:46 +00:00
modernize-use-nullptr.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
modernize-use-override-cxx98.cpp [clang-tidy] Move misc-use-override and readability-shrink-to-fit to "modernize/" 2015-08-31 13:17:43 +00:00
modernize-use-override.cpp [clang-tidy] Move misc-use-override and readability-shrink-to-fit to "modernize/" 2015-08-31 13:17:43 +00:00
nolint.cpp [clang-tidy] Support initializer_list in google-explicit-constructor check 2014-11-27 11:11:47 +00:00
readability-braces-around-statements-few-lines.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
readability-braces-around-statements-same-line.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
readability-braces-around-statements-single-line.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
readability-braces-around-statements.cpp [clang-tidy] Fix PR22785. 2015-09-09 17:06:09 +00:00
readability-container-size-empty.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
readability-else-after-return.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
readability-function-size.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
readability-identifier-naming.cpp [clang-tidy] Code factorization and cleanup in IdentifierNamingCheck 2015-09-28 08:59:12 +00:00
readability-inconsistent-declaration-parameter-name.cpp clang-tidy/readability-inconsistent-declaration-parameter-name.cpp: Appease MS-incompatibility [-fno-delayed-template-parsing] 2015-09-11 08:16:22 +00:00
readability-named-parameter.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
readability-redundant-smartptr-get.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
readability-redundant-string-cstr.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
readability-simplify-bool-expr-chained-conditional-assignment.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
readability-simplify-bool-expr-chained-conditional-return.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
readability-simplify-bool-expr.cpp [clang-tidy] Use a python script instead of a shell script to run clang-tidy tests. 2015-08-20 17:58:07 +00:00
select-checks.cpp [clang-tidy] Move the missing namespace comment warnings to the closing brace 2014-11-17 17:32:32 +00:00
serialize-diagnostics.cpp [clang-tidy] Make a test independent of the default check set. 2014-12-03 13:48:46 +00:00
static-analyzer-config.cpp [clang-tidy] Static Analyzer checker configuration options pass-through. 2015-03-11 17:25:22 +00:00
static-analyzer.cpp Change the behavior of clang-tidy -checks=, remove -disable-checks. 2014-05-15 14:27:36 +00:00
temporaries.cpp Change the behavior of clang-tidy -checks=, remove -disable-checks. 2014-05-15 14:27:36 +00:00
validate-check-names.cpp [clang-tidy] Allow use of -list-checks option without need to pass source files. 2015-08-17 10:03:27 +00:00