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

Manuel Klimek via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 28 01:46:15 PDT 2015


klimek added inline comments.

================
Comment at: clang-tidy/modernize/MakeUniqueCheck.cpp:26-28
@@ +25,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,
+                          const LangOptions &LO) {
----------------
That should not be possible for the spelling location. Generally, I'd avoid writing code that doesn't fix a breaking test.


http://reviews.llvm.org/D13166





More information about the cfe-commits mailing list