[PATCH] D13166: Create modernize-make-unique check.

Angel Garcia via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 28 01:38:44 PDT 2015


angelgarcia added inline comments.

================
Comment at: clang-tidy/modernize/MakeUniqueCheck.cpp:25-27
@@ +24,5 @@
+
+/// \brief Returns the length of the token that goes since the beggining of the
+/// constructor call until the '<' of the template. This token should either be
+/// 'unique_ptr' or 'std::unique_ptr'. In any other case, it returns 0.
+static int getTokenLength(SourceLocation TokenStart, const SourceManager &SM,
----------------
klimek wrote:
> How can that ever return 0 if you have matchesName("::std::unique_ptr") below?
Maybe using macros or something like that. As I said, it needs to be more carefully tested.


http://reviews.llvm.org/D13166





More information about the cfe-commits mailing list