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
___
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 to
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
http://lists.llvm.org/cgi-bin/mailman/listinfo/
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, cxxConstructExpr().bind("co
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"),
+
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
cfe-commits@li
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
clang-tidy/
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 si