[PATCH] [clang-tidy] Ignore expressions with incompatible deleters.

Samuel Benzaquen sbenza at google.com
Thu Apr 9 09:50:31 PDT 2015


================
Comment at: clang-tidy/misc/UniqueptrResetReleaseCheck.cpp:52
@@ +51,3 @@
+  const auto *RightDeleter = getDeleterForUniquePtr(Result, "right_class");
+  if (!LeftDeleter || !RightDeleter)
+    return false;
----------------
alexfh wrote:
> sbenza wrote:
> > alexfh wrote:
> > > Can this only happen if unique_ptr is defined in a nonstandard way?
> > The deleter could be a function pointer.
> Ah, I see. But then we can also check if the function pointers are compatible and allow the fix, can't we?
Done

http://reviews.llvm.org/D8422

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






More information about the cfe-commits mailing list