Re: [PATCH] D21185: [clang-tidy] Add performance-emplace-into-containers

2016-06-22 Thread Vedant Kumar via cfe-commits
vsk abandoned this revision. vsk added a comment. Thanks for the valuable feedback! I'll keep all of it in mind when writing checks in the future. I'm closing this revision since http://reviews.llvm.org/D20964 is in. http://reviews.llvm.org/D21185

Re: [PATCH] D21185: [clang-tidy] Add performance-emplace-into-containers

2016-06-22 Thread Piotr Padlewski via cfe-commits
Prazek added a subscriber: Prazek. Prazek added a comment. In http://reviews.llvm.org/D21185#464517, @Eugene.Zelenko wrote: > Since http://reviews.llvm.org/D20964 was committed, I think we should close > this. Yep, I think the best idea is to take all the goodies from this check and add it

Re: [PATCH] D21185: [clang-tidy] Add performance-emplace-into-containers

2016-06-22 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a comment. Since http://reviews.llvm.org/D20964 was committed, I think we should close this. http://reviews.llvm.org/D21185 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D21185: [clang-tidy] Add performance-emplace-into-containers

2016-06-22 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/performance/EmplaceCheck.cpp:26 @@ +25,3 @@ + on(expr(hasType(cxxRecordDecl(hasName("std::vector"), + callee(functionDecl(hasName("push_back"))), + hasArgument(0,

Re: [PATCH] D21185: [clang-tidy] Add performance-emplace-into-containers

2016-06-17 Thread Samuel Benzaquen via cfe-commits
sbenza added a comment. Missing the .rst file. Did you use the check_clang_tidy.py script to create the template? Comment at: clang-tidy/performance/EmplaceCheck.cpp:25 @@ +24,3 @@ + cxxMemberCallExpr( + on(expr(hasType(cxxRecordDecl(hasName("std::vector"), +

Re: [PATCH] D21185: [clang-tidy] Add performance-emplace-into-containers

2016-06-09 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Eugene.Zelenko added a comment. See also http://reviews.llvm.org/D20964. I think modernize is better place for such check. http://reviews.llvm.org/D21185 ___ cfe-commits mailing list

Re: [PATCH] D21185: [clang-tidy] Add performance-emplace-into-containers

2016-06-09 Thread Vedant Kumar via cfe-commits
vsk updated this revision to Diff 60206. vsk added a comment. - Fix the diagnostic message. Suggested by Erik Pilkington. http://reviews.llvm.org/D21185 Files: clang-tidy/performance/CMakeLists.txt clang-tidy/performance/EmplaceCheck.cpp clang-tidy/performance/EmplaceCheck.h

Re: [PATCH] D21185: [clang-tidy] Add performance-emplace-into-containers

2016-06-09 Thread Vedant Kumar via cfe-commits
vsk added a reviewer: flx. vsk updated this revision to Diff 60194. vsk added a comment. - Fix handling of push_back(X(/* comment */)). - Don't try to emit a warning when the callee comes from a macro expansion. - Get rid of a weird/wrong comment about checking for "default constructors". As a

[PATCH] D21185: [clang-tidy] Add performance-emplace-into-containers

2016-06-09 Thread Vedant Kumar via cfe-commits
vsk created this revision. vsk added reviewers: aaron.ballman, alexfh. vsk added a subscriber: cfe-commits. Introduce a check which suggests when it might be helpful to use "emplace" methods. The initial version only works with std::vector and push_back (e.g `V.push_back(T(1, 2))` ->