Re: [PATCH] Add clang-tidy check for unique_ptr's reset+release→move

Alexander Kornienko alexfh at google.com
Mon Feb 23 09:04:34 PST 2015


================
Comment at: test/clang-tidy/uniqueptr-reset-release.cpp:36
@@ +35,3 @@
+  a.reset(Create().release());
+  // CHECK-MESSAGES: :[[@LINE-1]]:5: warning: prefer ptr1 = std::move(ptr2) over ptr1.reset(ptr2.release())
+  // CHECK-FIXES: a = Create();
----------------
The message for this case shouldn't mention std::move. Can you fix this?

http://reviews.llvm.org/D6485

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list