[clang-tools-extra] [clang-tidy] properly handle private move constructors in `modernize-pass-by-value` check (PR #141304)
via cfe-commits
cfe-commits at lists.llvm.org
Fri May 23 16:56:42 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp -- clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp clang-tools-extra/test/clang-tidy/checkers/modernize/pass-by-value.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp b/clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp
index 343cc966b..1e271dfa7 100644
--- a/clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp
@@ -34,7 +34,7 @@ static bool isFirstFriendOfSecond(const CXXRecordDecl *Friend,
namespace {
/// Matches move-constructible classes whose constructor can be called inside
-/// a CXXRecordDecl with a bound ID.
+/// a CXXRecordDecl with a bound ID.
///
/// Given
/// \code
@@ -49,7 +49,7 @@ namespace {
/// class Buz {
/// Buz(Buz &&);
/// int a;
-/// friend class Outer;
+/// friend class Outer;
/// };
///
/// class Outer {
``````````
</details>
https://github.com/llvm/llvm-project/pull/141304
More information about the cfe-commits
mailing list