[PATCH] D33209: [clang-tidy] Add "emplace_back" detection in inefficient-vector-operation.

2017-05-16 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL303157: [clang-tidy] Add "emplace_back" detection in inefficient-vector-operation. (authored by hokein). Changed prior to commit: https://reviews.llvm.org/D33209?vs=99124=99127#toc Repository: rL

[PATCH] D33209: [clang-tidy] Add "emplace_back" detection in inefficient-vector-operation.

2017-05-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tidy/performance/InefficientVectorOperationCheck.cpp:50 +static const char PushBackOrEmplaceBackCallName[] = +"push_back_or_emplace_back_call"; static const char LoopInitVarName[] = "loop_init_var"; alexfh

[PATCH] D33209: [clang-tidy] Add "emplace_back" detection in inefficient-vector-operation.

2017-05-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 99124. hokein marked 3 inline comments as done. hokein added a comment. Improve tests. https://reviews.llvm.org/D33209 Files: clang-tidy/performance/InefficientVectorOperationCheck.cpp docs/clang-tidy/checks/performance-inefficient-vector-operation.rst

[PATCH] D33209: [clang-tidy] Add "emplace_back" detection in inefficient-vector-operation.

2017-05-16 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG once the comments are addressed. https://reviews.llvm.org/D33209 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D33209: [clang-tidy] Add "emplace_back" detection in inefficient-vector-operation.

2017-05-16 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/performance/InefficientVectorOperationCheck.cpp:208 + "consider pre-allocating the vector capacity before the loop") + << VectorAppendCall->getMethodDecl()->getDeclName(); hokein wrote: >

[PATCH] D33209: [clang-tidy] Add "emplace_back" detection in inefficient-vector-operation.

2017-05-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as done. hokein added inline comments. Comment at: clang-tidy/performance/InefficientVectorOperationCheck.cpp:92 + const auto VectorAppendCall = expr( + anyOf(VectorAppendCallExpr, exprWithCleanups(has(VectorAppendCallExpr; const

[PATCH] D33209: [clang-tidy] Add "emplace_back" detection in inefficient-vector-operation.

2017-05-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 99119. hokein marked an inline comment as done. hokein added a comment. Adress review comments. https://reviews.llvm.org/D33209 Files: clang-tidy/performance/InefficientVectorOperationCheck.cpp

[PATCH] D33209: [clang-tidy] Add "emplace_back" detection in inefficient-vector-operation.

2017-05-16 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/performance/InefficientVectorOperationCheck.cpp:208 + "consider pre-allocating the vector capacity before the loop") + << VectorAppendCall->getMethodDecl()->getDeclName(); Diagnostic builder

[PATCH] D33209: [clang-tidy] Add "emplace_back" detection in inefficient-vector-operation.

2017-05-15 Thread Malcolm Parsons via Phabricator via cfe-commits
malcolm.parsons added a subscriber: cfe-commits. malcolm.parsons added inline comments. Comment at: clang-tidy/performance/InefficientVectorOperationCheck.cpp:92 + const auto VectorAppendCall = expr( + anyOf(VectorAppendCallExpr,