Prazek added inline comments.

================
Comment at: clang-tidy/modernize/UseEmplaceCheck.cpp:31
@@ +30,3 @@
+                        on(hasType(cxxRecordDecl(hasName(VectorName)))))
+          .bind("call");
+
----------------
ok, std::list works for me. I just don't want to spend much time on it right 
now, and I want to be sure it works.

================
Comment at: clang-tidy/modernize/UseEmplaceCheck.cpp:39
@@ +38,3 @@
+      ofClass(hasAnyName("std::shared_ptr", "std::unique_ptr", "std::auto_ptr",
+                         "std::weak_ptr"))));
+
----------------
Look at tests - the same thing happens when

std::vector<std::unique_ptr<int>> v;

const auto *p = new int;
v.push_back(p);

Not many custom classes take pointer in constructor. 
If I will look for const pointers, then I will not be able to pass "abc" into 
vector<string>.

So I guess this solution seems to be the best idea. 


http://reviews.llvm.org/D20964



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to