[PATCH] D43766: [clang-tidy][modernize-make-unique] Checks c++14 flag before using std::make_unique

Frederic Tingaud via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 1 10:51:31 PST 2018


ftingaud added inline comments.


================
Comment at: test/clang-tidy/modernize-make-unique-cxx14.cpp:10
+  // CHECK-MESSAGES: :[[@LINE-1]]:17: warning: use std::make_unique instead
+  // CHECK-FIXES: auto my_ptr = std::make_unique<int>(1);
+  return 0;
----------------
Quuxplusone wrote:
> IIUC above, you allow the user to pass in the name of a custom `my::make_unique` function. Could you add a test case for that?
It is tested by modernize-make-unique-header.cpp and the patch doesn't change the feature.


https://reviews.llvm.org/D43766





More information about the cfe-commits mailing list