[Openmp-commits] [clang-tools-extra] [openmp] [llvm] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

via Openmp-commits openmp-commits at lists.llvm.org
Fri Dec 1 15:57:04 PST 2023

@@ -0,0 +1,17 @@
+.. title:: clang-tidy - bugprone-move-shared-pointer-contents
+Detects calls to move the contents out of a ``std::shared_ptr`` rather than
+moving the pointer itself. In other words, calling ``std::move(*p)``. Other
+reference holders may not be expecting the move and suddenly getting empty or
+otherwise indeterminate states can cause issues.
+.. option :: SharedPointerClasses
+   A semicolon-separated list of class names that should be treated as shared
+   pointers. By default only `std::shared_ptr` is included.
pizzud wrote:



More information about the Openmp-commits mailing list