llvm-project/clang-tools-extra/clang-tidy/modernize
Angel Garcia Gomez 432ff5e205 Handle correctly containers that are data members in modernize-loop-convert.
Summary:
I recently found that the variable naming wasn't working as expected with containers that are data members. The new index always received the name "Elem" (or equivalent) regardless of the container's name.
The check was assuming that the container's declaration was a VarDecl, which cannot be converted to a FieldDecl (a data member), and then it could never retrieve its name.

This also fixes some cases where the check failed to find the container at all (so it didn't do any fix) because of the same reason.

Reviewers: klimek

Subscribers: cfe-commits, alexfh

Differential Revision: http://reviews.llvm.org/D14289

llvm-svn: 251943
2015-11-03 16:38:31 +00:00
..
CMakeLists.txt Add modernize-redundant-void-arg check to clang-tidy 2015-10-28 01:36:20 +00:00
LoopConvertCheck.cpp Handle correctly containers that are data members in modernize-loop-convert. 2015-11-03 16:38:31 +00:00
LoopConvertCheck.h Handle correctly containers that are data members in modernize-loop-convert. 2015-11-03 16:38:31 +00:00
LoopConvertUtils.cpp Replace double negation of !FileID.isInvalid() with FileID.isValid(). 2015-10-03 10:46:20 +00:00
LoopConvertUtils.h Handle correctly containers that are data members in modernize-loop-convert. 2015-11-03 16:38:31 +00:00
MakeUniqueCheck.cpp Correctly print the type in modernize-make-unique. 2015-10-22 13:20:49 +00:00
MakeUniqueCheck.h Create modernize-make-unique check. 2015-09-29 09:36:41 +00:00
Makefile
ModernizeTidyModule.cpp Only copy small types in modernize-loop-convert. 2015-10-30 09:37:57 +00:00
PassByValueCheck.cpp Improved the misc-move-constructor-init check to identify arguments that are passed by value but copy assigned to class data members when the non-deleted move constructor is a better fit. 2015-10-06 16:27:03 +00:00
PassByValueCheck.h
RedundantVoidArgCheck.cpp Fix another crash in the redundant-void-arg check. 2015-11-02 16:18:23 +00:00
RedundantVoidArgCheck.h Add modernize-redundant-void-arg check to clang-tidy 2015-10-28 01:36:20 +00:00
ReplaceAutoPtrCheck.cpp Make string constants in the modernize module static. 2015-10-22 09:48:23 +00:00
ReplaceAutoPtrCheck.h [clang-tidy] Updated docs. 2015-09-08 09:44:04 +00:00
ShrinkToFitCheck.cpp Make a bunch of static arrays const. 2015-10-18 05:14:41 +00:00
ShrinkToFitCheck.h [clang-tidy] Move misc-use-override and readability-shrink-to-fit to "modernize/" 2015-08-31 13:17:43 +00:00
UseAutoCheck.cpp Make a bunch of static arrays const. 2015-10-18 05:14:41 +00:00
UseAutoCheck.h [clang-tidy] Migrate UseAuto from clang-modernize to clang-tidy. 2015-08-21 15:08:51 +00:00
UseDefaultCheck.cpp modernize-use-default supports copy constructor and copy-assignment operator. 2015-11-02 10:34:19 +00:00
UseDefaultCheck.h Add modernize-use-default check to clang-tidy. 2015-10-21 12:58:15 +00:00
UseNullptrCheck.cpp Remove unreachable that was reached in modernize-use-nullptr. 2015-11-02 15:28:06 +00:00
UseNullptrCheck.h [clang-tidy] Fix use-after-free in UseNullptrCheck. 2015-08-19 23:57:34 +00:00
UseOverrideCheck.cpp Refactors AST matching code to use the new AST matcher names. This patch correlates to r247885 which performs the AST matcher rename in Clang. 2015-09-17 13:31:25 +00:00
UseOverrideCheck.h [clang-tidy] Move misc-use-override and readability-shrink-to-fit to "modernize/" 2015-08-31 13:17:43 +00:00