[clang-tools-extra] [clang-tidy] Fix smart pointers handling in bugprone-use-after-move (PR #94869)

via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 12 07:13:55 PDT 2024


================
@@ -200,7 +200,8 @@ An exception to this are objects of type ``std::unique_ptr``,
 (objects of these classes are guaranteed to be empty after they have been moved
 from). Therefore, an object of these classes will only be considered to be used
 if it is dereferenced, i.e. if ``operator*``, ``operator->`` or ``operator[]``
-(in the case of ``std::unique_ptr<T []>``) is called on it.
+(in the case of ``std::unique_ptr<T []>``) is called on it. This behavior can be
----------------
martinboehme wrote:

This part of the documentation still reads as if this is the default behavior, but in fact it isn't. Can you rephrase this to make this clear that this is optional (non-default) behavior that is activated by setting the `AllowMovedSmartPtrUse` option?

https://github.com/llvm/llvm-project/pull/94869


More information about the cfe-commits mailing list