Skip to content

Commit be22728

Browse files
committed
rename
1 parent 6a599b3 commit be22728

File tree

8 files changed

+22
-22
lines changed

8 files changed

+22
-22
lines changed

clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "BitwisePointerCastCheck.h"
1717
#include "BoolPointerImplicitConversionCheck.h"
1818
#include "BranchCloneCheck.h"
19-
#include "CaptureThisByFieldCheck.h"
19+
#include "CapturingThisByFieldCheck.h"
2020
#include "CastingThroughVoidCheck.h"
2121
#include "ChainedComparisonCheck.h"
2222
#include "ComparePointerToMemberVirtualFunctionCheck.h"
@@ -119,8 +119,8 @@ class BugproneModule : public ClangTidyModule {
119119
CheckFactories.registerCheck<BoolPointerImplicitConversionCheck>(
120120
"bugprone-bool-pointer-implicit-conversion");
121121
CheckFactories.registerCheck<BranchCloneCheck>("bugprone-branch-clone");
122-
CheckFactories.registerCheck<CaptureThisByFieldCheck>(
123-
"bugprone-capture-this-by-field");
122+
CheckFactories.registerCheck<CapturingThisByFieldCheck>(
123+
"bugprone-capturing-this-by-field");
124124
CheckFactories.registerCheck<CastingThroughVoidCheck>(
125125
"bugprone-casting-through-void");
126126
CheckFactories.registerCheck<ChainedComparisonCheck>(

clang-tools-extra/clang-tidy/bugprone/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ add_clang_library(clangTidyBugproneModule STATIC
1212
BoolPointerImplicitConversionCheck.cpp
1313
BranchCloneCheck.cpp
1414
BugproneTidyModule.cpp
15-
CaptureThisByFieldCheck.cpp
15+
CapturingThisByFieldCheck.cpp
1616
CastingThroughVoidCheck.cpp
1717
ChainedComparisonCheck.cpp
1818
ComparePointerToMemberVirtualFunctionCheck.cpp

clang-tools-extra/clang-tidy/bugprone/CaptureThisByFieldCheck.cpp renamed to clang-tools-extra/clang-tidy/bugprone/CapturingThisByFieldCheck.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
//===--- CaptureThisByFieldCheck.cpp - clang-tidy -------------------------===//
1+
//===--- CapturingThisByFieldCheck.cpp - clang-tidy -----------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "CaptureThisByFieldCheck.h"
9+
#include "CapturingThisByFieldCheck.h"
1010
#include "clang/AST/DeclCXX.h"
1111
#include "clang/ASTMatchers/ASTMatchFinder.h"
1212
#include "clang/ASTMatchers/ASTMatchers.h"
@@ -58,7 +58,7 @@ AST_MATCHER(CXXRecordDecl, correctHandleCaptureThisLambda) {
5858

5959
} // namespace
6060

61-
void CaptureThisByFieldCheck::registerMatchers(MatchFinder *Finder) {
61+
void CapturingThisByFieldCheck::registerMatchers(MatchFinder *Finder) {
6262
auto IsStdFunctionField =
6363
fieldDecl(hasType(cxxRecordDecl(hasName("::std::function"))))
6464
.bind("field");
@@ -81,7 +81,7 @@ void CaptureThisByFieldCheck::registerMatchers(MatchFinder *Finder) {
8181
this);
8282
}
8383

84-
void CaptureThisByFieldCheck::check(const MatchFinder::MatchResult &Result) {
84+
void CapturingThisByFieldCheck::check(const MatchFinder::MatchResult &Result) {
8585
const auto *Capture = Result.Nodes.getNodeAs<LambdaCapture>("capture");
8686
const auto *Lambda = Result.Nodes.getNodeAs<LambdaExpr>("lambda");
8787
const auto *Field = Result.Nodes.getNodeAs<FieldDecl>("field");

clang-tools-extra/clang-tidy/bugprone/CaptureThisByFieldCheck.h renamed to clang-tools-extra/clang-tidy/bugprone/CapturingThisByFieldCheck.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
//===--- CaptureThisByFieldCheck.h - clang-tidy -----------------*- C++ -*-===//
1+
//===--- CapturingThisByFieldCheck.h - clang-tidy ---------------*- C++ -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_CAPTURETHISBYFIELDCHECK_H
10-
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_CAPTURETHISBYFIELDCHECK_H
9+
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_CAPTURINGTHISBYFIELDCHECK_H
10+
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_CAPTURINGTHISBYFIELDCHECK_H
1111

1212
#include "../ClangTidyCheck.h"
1313
#include "clang/AST/ASTTypeTraits.h"
@@ -20,10 +20,10 @@ namespace clang::tidy::bugprone {
2020
/// assignments.
2121
///
2222
/// For the user-facing documentation see:
23-
/// http://clang.llvm.org/extra/clang-tidy/checks/bugprone/capture-this-by-field.html
24-
class CaptureThisByFieldCheck : public ClangTidyCheck {
23+
/// http://clang.llvm.org/extra/clang-tidy/checks/bugprone/capturing-this-by-field.html
24+
class CapturingThisByFieldCheck : public ClangTidyCheck {
2525
public:
26-
CaptureThisByFieldCheck(StringRef Name, ClangTidyContext *Context)
26+
CapturingThisByFieldCheck(StringRef Name, ClangTidyContext *Context)
2727
: ClangTidyCheck(Name, Context) {}
2828
void registerMatchers(ast_matchers::MatchFinder *Finder) override;
2929
void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
@@ -37,4 +37,4 @@ class CaptureThisByFieldCheck : public ClangTidyCheck {
3737

3838
} // namespace clang::tidy::bugprone
3939

40-
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_CAPTURETHISBYFIELDCHECK_H
40+
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_BUGPRONE_CAPTURINGTHISBYFIELDCHECK_H

clang-tools-extra/docs/ReleaseNotes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ Improvements to clang-tidy
9191
New checks
9292
^^^^^^^^^^
9393

94-
- New :doc:`bugprone-capture-this-by-field
95-
<clang-tidy/checks/bugprone/capture-this-by-field>` check.
94+
- New :doc:`bugprone-capturing-this-by-field
95+
<clang-tidy/checks/bugprone/capturing-this-by-field>` check.
9696

9797
Finds lambda captures that capture the ``this`` pointer and store it as class
9898
members without handle the copy and move constructors and the assignments.

clang-tools-extra/docs/clang-tidy/checks/bugprone/capture-this-by-field.rst renamed to clang-tools-extra/docs/clang-tidy/checks/bugprone/capturing-this-by-field.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
.. title:: clang-tidy - bugprone-capture-this-by-field
1+
.. title:: clang-tidy - bugprone-capturing-this-by-field
22

3-
bugprone-capture-this-by-field
4-
==============================
3+
bugprone-capturing-this-by-field
4+
================================
55

66
Finds lambda captures that capture the ``this`` pointer and store it as class
77
members without handle the copy and move constructors and the assignments.

clang-tools-extra/docs/clang-tidy/checks/list.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Clang-Tidy Checks
8484
:doc:`bugprone-bitwise-pointer-cast <bugprone/bitwise-pointer-cast>`,
8585
:doc:`bugprone-bool-pointer-implicit-conversion <bugprone/bool-pointer-implicit-conversion>`, "Yes"
8686
:doc:`bugprone-branch-clone <bugprone/branch-clone>`,
87-
:doc:`bugprone-capture-this-by-field <bugprone/capture-this-by-field>`,
87+
:doc:`bugprone-capturing-this-by-field <bugprone/capturing-this-by-field>`,
8888
:doc:`bugprone-casting-through-void <bugprone/casting-through-void>`,
8989
:doc:`bugprone-chained-comparison <bugprone/chained-comparison>`,
9090
:doc:`bugprone-compare-pointer-to-member-virtual-function <bugprone/compare-pointer-to-member-virtual-function>`,

clang-tools-extra/test/clang-tidy/checkers/bugprone/capture-this-by-field.cpp renamed to clang-tools-extra/test/clang-tidy/checkers/bugprone/capturing-this-by-field.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %check_clang_tidy -std=c++11-or-later %s bugprone-capture-this-by-field %t
1+
// RUN: %check_clang_tidy -std=c++11-or-later %s bugprone-capturing-this-by-field %t
22

33
namespace std {
44

0 commit comments

Comments
 (0)