llvm-project/clang-tools-extra/clang-tidy/performance
Shuai Wang 0ed0febb3e Use ExprMutationAnalyzer in performance-for-range-copy
Summary:
This gives better coverage to the check as ExprMutationAnalyzer is more
accurate comparing to isOnlyUsedAsConst.

Majority of wins come from const usage of member field, e.g.:
for (auto widget : container) { // copy of loop variable
  if (widget.type == BUTTON) { // const usage only recognized by ExprMutationAnalyzer
    // ...
  }
}

Reviewers: george.karpenkov

Subscribers: a.sidorin, cfe-commits

Differential Revision: https://reviews.llvm.org/D48854

llvm-svn: 336737
2018-07-10 22:51:06 +00:00
..
CMakeLists.txt [clang-tidy] Move more checks from misc- to performance- 2017-11-28 16:41:03 +00:00
FasterStringFindCheck.cpp Adapt clang-tidy checks to changing semantics of hasDeclaration. 2017-08-02 13:13:11 +00:00
FasterStringFindCheck.h [clang-tidy] Add check performance-faster-string-find 2016-02-12 19:28:14 +00:00
ForRangeCopyCheck.cpp Use ExprMutationAnalyzer in performance-for-range-copy 2018-07-10 22:51:06 +00:00
ForRangeCopyCheck.h [clang-tidy] ForRangeCopyCheck that warns on and fixes unnecessary copies of loop variables. 2016-01-29 15:54:26 +00:00
ImplicitConversionInLoopCheck.cpp Add support for arrays in performance-implicit-conversion-in-loop 2018-06-11 12:46:48 +00:00
ImplicitConversionInLoopCheck.h Add support for arrays in performance-implicit-conversion-in-loop 2018-06-11 12:46:48 +00:00
InefficientAlgorithmCheck.cpp [clang-tidy] Move checks from misc- to performance- 2017-11-27 13:06:28 +00:00
InefficientAlgorithmCheck.h [clang-tidy] Move checks from misc- to performance- 2017-11-27 13:06:28 +00:00
InefficientStringConcatenationCheck.cpp Adapt clang-tidy checks to changing semantics of hasDeclaration. 2017-08-02 13:13:11 +00:00
InefficientStringConcatenationCheck.h [clang-tidy] Inefficient string operation 2016-08-03 23:06:03 +00:00
InefficientVectorOperationCheck.cpp [clang-tidy] Add "emplace_back" detection in inefficient-vector-operation. 2017-05-16 10:39:55 +00:00
InefficientVectorOperationCheck.h [clang-tidy] Support detecting for-range loop in inefficient-vector-operation check. 2017-04-26 18:13:05 +00:00
MoveConstArgCheck.cpp [clang-tidy] Move more checks from misc- to performance- 2017-11-28 16:41:03 +00:00
MoveConstArgCheck.h [clang-tidy] Move more checks from misc- to performance- 2017-11-28 16:41:03 +00:00
MoveConstructorInitCheck.cpp [clang-tidy] Move checks from misc- to performance- 2017-11-27 13:06:28 +00:00
MoveConstructorInitCheck.h [clang-tidy] Move checks from misc- to performance- 2017-11-27 13:06:28 +00:00
NoexceptMoveConstructorCheck.cpp Update to match clang r331428. 2018-05-03 03:59:50 +00:00
NoexceptMoveConstructorCheck.h [clang-tidy] Move more checks from misc- to performance- 2017-11-28 16:41:03 +00:00
PerformanceTidyModule.cpp [clang-tidy] Move more checks from misc- to performance- 2017-11-28 16:41:03 +00:00
TypePromotionInMathFnCheck.cpp [clang-tidy] Unify the way IncludeStyle and HeaderFileExtesions options are used 2017-07-20 12:02:03 +00:00
TypePromotionInMathFnCheck.h [clang-tidy] Suggest including <cmath> if necessary in type-promotion-in-math-fn-check. 2016-12-14 06:52:23 +00:00
UnnecessaryCopyInitialization.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
UnnecessaryCopyInitialization.h [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
UnnecessaryValueParamCheck.cpp [clang-tidy] ObjC ARC objects should not trigger performance-unnecessary-value-param 2018-02-02 15:34:33 +00:00
UnnecessaryValueParamCheck.h [clang-tidy] UnnecessaryValueParamCheck - suggest std::move() if non-const value parameter can be moved. 2016-07-01 20:12:15 +00:00