[llvm] [libc] [clang-tools-extra] [compiler-rt] [flang] [clang] [libcxx] [openmp] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
@@ -0,0 +1,75 @@ +// RUN: %check_clang_tidy %s bugprone-move-shared-pointer-contents %t -- -config="{CheckOptions: {bugprone-move-shared-pointer-contents.SharedPointerClasses: 'std::shared_ptr;my::OtherSharedPtr;'}}" + +// Some dummy definitions we'll need. + +namespace std {

[llvm] [libc] [clang-tools-extra] [compiler-rt] [flang] [clang] [libcxx] [openmp] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
@@ -0,0 +1,51 @@ +//===--- MoveSharedPointerContentsCheck.cpp - clang-tidy --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[llvm] [libc] [clang-tools-extra] [compiler-rt] [flang] [clang] [libcxx] [openmp] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
@@ -0,0 +1,39 @@ +//===--- MoveSharedPointerContentsCheck.h - clang-tidy --*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: