llvm-project/clang-tools-extra/clang-tidy/utils
Felix Berger 7f8827576c [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved.
Summary:

Make check more useful in the following two cases:

The parameter is passed by non-const value, has a non-deleted move constructor and is only referenced once in the function as argument to the type's copy constructor.
The parameter is passed by non-const value, has a non-deleted move assignment operator and is only referenced once in the function as argument of the the type's copy assignment operator.
In this case suggest a fix to move the parameter which avoids the unnecessary copy and is closest to what the user might have intended.

Reviewers: alexfh, sbenza

Subscribers: cfe-commits, Prazek

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

llvm-svn: 274380
2016-07-01 20:12:15 +00:00
..
CMakeLists.txt [clang-tidy] Lift parsing of sequence of names functions to utils. 2016-05-10 15:31:15 +00:00
DeclRefExprUtils.cpp [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved. 2016-07-01 20:12:15 +00:00
DeclRefExprUtils.h [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved. 2016-07-01 20:12:15 +00:00
FixItHintUtils.cpp [clang-tidy] Cleanup namespace in utils folder. 2016-05-03 02:54:05 +00:00
FixItHintUtils.h [clang-tidy] Fix doxygen errors. NFC. 2016-06-17 11:43:33 +00:00
HeaderFileExtensionsUtils.cpp [clang-tidy] Cleanups utils files 2016-05-16 14:34:20 +00:00
HeaderFileExtensionsUtils.h [clang-tidy] Fix doxygen errors. NFC. 2016-06-17 11:43:33 +00:00
HeaderGuard.cpp [clang-tidy] Cleanups utils files 2016-05-16 14:34:20 +00:00
HeaderGuard.h [clang-tidy] Fix doxygen errors. NFC. 2016-06-17 11:43:33 +00:00
IncludeInserter.cpp [clang-tidy] Cleanups utils files 2016-05-16 14:34:20 +00:00
IncludeInserter.h [clang-tidy] Fix doxygen errors. NFC. 2016-06-17 11:43:33 +00:00
IncludeSorter.cpp [clang-tidy] Fix a functional change from r269656. 2016-05-18 09:48:46 +00:00
IncludeSorter.h [clang-tidy] More doc fixes. NFC. 2016-06-17 12:01:15 +00:00
LexerUtils.cpp [clang-tidy] Cleanup namespace in utils folder. 2016-05-03 02:54:05 +00:00
LexerUtils.h [clang-tidy] More doc fixes. NFC. 2016-06-17 12:01:15 +00:00
Matchers.h [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved. 2016-07-01 20:12:15 +00:00
OptionsUtils.cpp [clang-tidy] Lift parsing of sequence of names functions to utils. 2016-05-10 15:31:15 +00:00
OptionsUtils.h [clang-tidy] More doc fixes. NFC. 2016-06-17 12:01:15 +00:00
TypeTraits.cpp [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved. 2016-07-01 20:12:15 +00:00
TypeTraits.h [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved. 2016-07-01 20:12:15 +00:00