clang-tidy: Enable performance-inefficient-vector-operation check
Finds possible inefficient std::vector operations (e.g. push_back,
emplace_back) that may cause unnecessary memory reallocations.
It can also find 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.
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I442c3aac7e3c71abbb125ae6bcdbe3f8995d14e9
diff --git a/.clang-tidy b/.clang-tidy
index 4ae3f8f..6569cc4 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -216,6 +216,7 @@
performance-implicit-conversion-in-loop,
performance-inefficient-algorithm,
performance-inefficient-string-concatenation,
+performance-inefficient-vector-operation,
performance-move-const-arg,
performance-move-constructor-init,
performance-no-automatic-move,