[PATCH] D20964: [clang-tidy] Add modernize-use-emplace
Eugene Zelenko via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 3 10:15:14 PDT 2016
Eugene.Zelenko added a subscriber: Eugene.Zelenko.
Eugene.Zelenko added a comment.
I think will be good idea to try this check with LLVM STL too.
================
Comment at: docs/clang-tidy/checks/modernize-use-emplace.rst:47
@@ +46,3 @@
+
+In this case the calls of push_back won't be replaced.
+
----------------
Please highlight push_back with ``.
================
Comment at: docs/clang-tidy/checks/modernize-use-emplace.rst:55
@@ +54,3 @@
+
+This is because replacing it with emplace_back could cause a leak of this
+this pointer, if emplace_back would throw exception before emplacement
----------------
Please highlight emplace_back with ``. Same below.
================
Comment at: test/clang-tidy/modernize-use-emplace.cpp:12
@@ +11,3 @@
+ void emplace_back(Args &&... args);
+};
+template <typename T>
----------------
Please insert new line.
================
Comment at: test/clang-tidy/modernize-use-emplace.cpp:78
@@ +77,3 @@
+ operator S() { return S{}; }
+};
+struct Zoz {
----------------
Please insert new line.
http://reviews.llvm.org/D20964
More information about the cfe-commits
mailing list