hanchenye-llvm-project/clang-tools-extra/clang-tidy/performance
Haojian Wu ad7a7cea89 [clang-tidy] performance-inefficient-vector-operation: Support proto repeated field
Summary:
Finds calls that add element to protobuf repeated field in a loop
without calling Reserve() before the loop. Calling Reserve() first can avoid
unnecessary memory reallocations.

A new option EnableProto is added to guard this feature.

Patch by Cong Liu!

Reviewers: gribozavr, alexfh, hokein, aaron.ballman

Reviewed By: hokein

Subscribers: lebedev.ri, xazax.hun, Eugene.Zelenko, cfe-commits

Tags: #clang, #clang-tools-extra

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

llvm-svn: 371963
2019-09-16 08:54:10 +00:00
..
CMakeLists.txt
FasterStringFindCheck.cpp
FasterStringFindCheck.h
ForRangeCopyCheck.cpp
ForRangeCopyCheck.h
ImplicitConversionInLoopCheck.cpp
ImplicitConversionInLoopCheck.h
InefficientAlgorithmCheck.cpp
InefficientAlgorithmCheck.h
InefficientStringConcatenationCheck.cpp
InefficientStringConcatenationCheck.h
InefficientVectorOperationCheck.cpp [clang-tidy] performance-inefficient-vector-operation: Support proto repeated field 2019-09-16 08:54:10 +00:00
InefficientVectorOperationCheck.h [clang-tidy] performance-inefficient-vector-operation: Support proto repeated field 2019-09-16 08:54:10 +00:00
MoveConstArgCheck.cpp
MoveConstArgCheck.h
MoveConstructorInitCheck.cpp [clang-tools-extra] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:52:23 +00:00
MoveConstructorInitCheck.h
NoexceptMoveConstructorCheck.cpp
NoexceptMoveConstructorCheck.h
PerformanceTidyModule.cpp
TypePromotionInMathFnCheck.cpp [clang-tools-extra] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:52:23 +00:00
TypePromotionInMathFnCheck.h
UnnecessaryCopyInitialization.cpp
UnnecessaryCopyInitialization.h
UnnecessaryValueParamCheck.cpp [clang-tools-extra] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:52:23 +00:00
UnnecessaryValueParamCheck.h Remove \brief commands from doxygen comments. 2019-08-22 11:32:57 +00:00