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 [NFC] Fix build breakage due to missing dep caused by D51950 2018-09-12 00:32:13 +00:00
FasterStringFindCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FasterStringFindCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
ForRangeCopyCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ForRangeCopyCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
ImplicitConversionInLoopCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ImplicitConversionInLoopCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
InefficientAlgorithmCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InefficientAlgorithmCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
InefficientStringConcatenationCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InefficientStringConcatenationCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
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 Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MoveConstArgCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
MoveConstructorInitCheck.cpp [clang-tools-extra] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:52:23 +00:00
MoveConstructorInitCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
NoexceptMoveConstructorCheck.cpp [clang-tidy] Add FixItHint for performance-noexcept-move-constructor 2019-08-04 13:32:39 +00:00
NoexceptMoveConstructorCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
PerformanceTidyModule.cpp Fix file headers. NFC 2019-03-01 09:52:53 +00:00
TypePromotionInMathFnCheck.cpp [clang-tools-extra] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:52:23 +00:00
TypePromotionInMathFnCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
UnnecessaryCopyInitialization.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
UnnecessaryCopyInitialization.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
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