[PATCH] D20964: [clang-tidy] Add modernize-use-emplace

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 20 05:04:49 PDT 2016


hokein accepted this revision.
hokein added a comment.
This revision is now accepted and ready to land.

Looks almost good now, a few comments. You'd better await for comments from @alexfh or @sbenza before committing.


================
Comment at: docs/clang-tidy/checks/modernize-use-emplace.rst:62
@@ +61,3 @@
+
+Check also fire if any argument of constructor call woule be:
+- bitfield (bitfields can't bind to rvalue/universal reference)
----------------
s/fire/fires
s/woule/would

================
Comment at: test/clang-tidy/modernize-use-emplace.cpp:3
@@ +2,3 @@
+
+namespace std {
+template <typename T>
----------------
Oops, you are right. That's another non-relevant issue (different `emplace_back` behaviors in `vector<int>`, `vector<vector<int>>`). I'm over-concerned here. 



================
Comment at: test/clang-tidy/modernize-use-emplace.cpp:317
@@ +316,3 @@
+
+void testAggregation() {
+  // This should not be noticed or fixed; after the correction, the code won't
----------------
Looks like the test is kind of duplicated with `testAggregate` in L248, you can merge that one into this one.


http://reviews.llvm.org/D20964





More information about the cfe-commits mailing list