[PATCH] D67135: [clang-tidy] performance-inefficient-vector-operation: Support proto repeated field

2019-09-13 Thread Cong Liu via Phabricator via cfe-commits
congliu added a comment. Could someone commit this for me? I failed to commit this change... CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67135/new/ https://reviews.llvm.org/D67135 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D67135: [clang-tidy] performance-inefficient-vector-operation: Support proto repeated field

2019-09-12 Thread Cong Liu via Phabricator via cfe-commits
congliu updated this revision to Diff 219988. congliu marked an inline comment as done. congliu added a comment. Addressed Haojian's comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67135/new/ https://reviews.llvm.org/D67135 Files:

[PATCH] D67135: [clang-tidy] performance-inefficient-vector-operation: Support proto repeated field

2019-09-10 Thread Cong Liu via Phabricator via cfe-commits
congliu updated this revision to Diff 219576. congliu marked 6 inline comments as done. congliu added a comment. Addressed Haojian's comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67135/new/ https://reviews.llvm.org/D67135 Files:

[PATCH] D67135: [clang-tidy] performance-inefficient-vector-operation: Support proto repeated field

2019-09-06 Thread Cong Liu via Phabricator via cfe-commits
congliu added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/InefficientVectorOperationCheck.cpp:227 +std::string MutableFieldName = +("mutable_" + ProtoAddFieldCall->getMethodDecl()->getName().substr(4)) +.str();

[PATCH] D67135: [clang-tidy] performance-inefficient-vector-operation: Support proto repeated field

2019-09-06 Thread Cong Liu via Phabricator via cfe-commits
congliu updated this revision to Diff 219180. congliu marked 7 inline comments as done. congliu added a comment. Addressed Haojian's comments. - Do not warn when there is reference to the proto variable between its declaration and the loop body. - Exclude const methods. - Update tests.

[PATCH] D67302: Configure my project to use arcanist.

2019-09-06 Thread Cong Liu via Phabricator via cfe-commits
congliu created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D67302 Files: clang-tools-extra/.arcconfig clang-tools-extra/clang-tidy/performance/InefficientVectorOperationCheck.cpp

[PATCH] D67135: [clang-tidy] performance-inefficient-vector-operation: Support proto repeated field

2019-09-04 Thread Cong Liu via Phabricator via cfe-commits
congliu updated this revision to Diff 218789. congliu added a comment. Uploaded the correct diff... CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67135/new/ https://reviews.llvm.org/D67135 Files: clang-tools-extra/clang-tidy/performance/InefficientVectorOperationCheck.cpp

[PATCH] D67135: [clang-tidy] performance-inefficient-vector-operation: Support proto repeated field

2019-09-04 Thread Cong Liu via Phabricator via cfe-commits
congliu added a comment. In D67135#1657034 , @lebedev.ri wrote: > I'm not sure this is the correct approach. > I'd think the check instead should be parametrized, so this patch should > become just extending the config. Could you elaborate how the

[PATCH] D67135: [clang-tidy] performance-inefficient-vector-operation: Support proto repeated field

2019-09-04 Thread Cong Liu via Phabricator via cfe-commits
congliu updated this revision to Diff 218782. congliu added a comment. Updated option descriptions. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67135/new/ https://reviews.llvm.org/D67135 Files: clang-tools-extra/docs/clang-tidy/checks/performance-inefficient-vector-operation.rst

[PATCH] D67135: Support proto repeated field in performence-inefficient-vector-operation

2019-09-03 Thread Cong Liu via Phabricator via cfe-commits
congliu created this revision. congliu added a reviewer: gribozavr. Herald added a project: clang. Herald added a subscriber: cfe-commits. Finds calls that add element to protobuf repeated field in a loop without calling Reserve() before the loop. Calling Reserve() first can avoid unnecessary