llvm-project/clang-tools-extra/clang-tidy
Felix Berger 98e4019a58 [clang-tidy] UnnecessaryCopyInitialization - Extend to trigger on non-const "this" object argument if it is not modified.
Summary:

Also trigger the check in the following case:

void foo() {
  ExpensiveToCopy Obj;
  const auto UnnecessaryCopy = Obj.constReference();
  Obj.onlyUsedAsConst();
}

i.e. when the object the method is called on is not const but is never
modified.

Reviewers: alexfh, fowles

Subscribers: cfe-commits

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

llvm-svn: 271239
2016-05-31 00:25:57 +00:00
..
boost Add boost-use-to-string 2016-04-29 17:58:29 +00:00
cert [clang-tidy] Switch to a more common way of customizing check behavior. 2016-05-20 13:42:40 +00:00
cppcoreguidelines Fixed cppcoreguidelines-pro-type-member-init when checking records with indirect fields 2016-05-10 07:42:19 +00:00
google [clang-tidy] Fix/add style guide links. 2016-05-19 09:31:30 +00:00
llvm [clang-tidy] Cleanup namespace in utils folder. 2016-05-03 02:54:05 +00:00
misc Fix a wrong check in misc-unused-using-decls 2016-05-30 07:42:22 +00:00
modernize [clang-tidy] modernize-pass-by-value bugfix 2016-05-24 15:00:16 +00:00
performance [clang-tidy] UnnecessaryCopyInitialization - Extend to trigger on non-const "this" object argument if it is not modified. 2016-05-31 00:25:57 +00:00
plugin Add boost-use-to-string 2016-04-29 17:58:29 +00:00
readability Speed up check by using a recursive visitor. 2016-05-25 16:19:23 +00:00
tool Add boost-use-to-string 2016-04-29 17:58:29 +00:00
utils [clang-tidy] Fix a functional change from r269656. 2016-05-18 09:48:46 +00:00
CMakeLists.txt Add boost-use-to-string 2016-04-29 17:58:29 +00:00
ClangTidy.cpp Fix include path in ClangTidy.cpp. 2016-04-28 01:42:12 +00:00
ClangTidy.h [docs] Clean up doxygen comments a bit. 2016-03-06 04:05:59 +00:00
ClangTidyDiagnosticConsumer.cpp [clang-tidy] Switch to a more common way of customizing check behavior. 2016-05-20 13:42:40 +00:00
ClangTidyDiagnosticConsumer.h [clang-tidy] Switch to a more common way of customizing check behavior. 2016-05-20 13:42:40 +00:00
ClangTidyModule.cpp [clang-tidy] Default options in modules. 2014-10-16 11:27:57 +00:00
ClangTidyModule.h Revert "Apply modernize-use-default to clang-tools-extra." 2015-10-20 21:45:52 +00:00
ClangTidyModuleRegistry.h [clang-tidy] Fixed header guards using clang-tidy llvm-header-guard check. NFC. 2015-03-09 16:52:33 +00:00
ClangTidyOptions.cpp [ClangTidy] Add an 'explain-checks' option to diagnose where each checks comes from. 2016-04-27 09:15:01 +00:00
ClangTidyOptions.h [ClangTidy] Add an 'explain-checks' option to diagnose where each checks comes from. 2016-04-27 09:15:01 +00:00
add_new_check.py [clang-tidy] Remove redundant quote in add_new_check script 2016-05-30 15:42:08 +00:00
rename_check.py [clang-tidy] Python script for easy check rename 2015-10-11 07:58:34 +00:00