Skip to content

Commit 993db43

Browse files
committed
fix review
1 parent deb6e54 commit 993db43

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidConstOrRefDataMembersCheck.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ using namespace clang::ast_matchers;
1414

1515
namespace clang::tidy::cppcoreguidelines {
1616

17-
static bool hasCopyConstructor(CXXRecordDecl const &Node) {
17+
static bool isCopyConstructible(CXXRecordDecl const &Node) {
1818
if (Node.needsOverloadResolutionForCopyConstructor() &&
1919
Node.needsImplicitCopyConstructor()) {
2020
// unresolved
2121
for (CXXBaseSpecifier const &BS : Node.bases()) {
2222
CXXRecordDecl const *BRD = BS.getType()->getAsCXXRecordDecl();
23-
if (BRD != nullptr && !hasCopyConstructor(*BRD))
23+
if (BRD != nullptr && !isCopyConstructible(*BRD))
2424
return false;
2525
}
2626
}
@@ -32,13 +32,13 @@ static bool hasCopyConstructor(CXXRecordDecl const &Node) {
3232
return false;
3333
}
3434

35-
static bool hasMoveConstructor(CXXRecordDecl const &Node) {
35+
static bool isMoveConstructible(CXXRecordDecl const &Node) {
3636
if (Node.needsOverloadResolutionForMoveConstructor() &&
3737
Node.needsImplicitMoveConstructor()) {
3838
// unresolved
3939
for (CXXBaseSpecifier const &BS : Node.bases()) {
4040
CXXRecordDecl const *BRD = BS.getType()->getAsCXXRecordDecl();
41-
if (BRD != nullptr && !hasMoveConstructor(*BRD))
41+
if (BRD != nullptr && !isMoveConstructible(*BRD))
4242
return false;
4343
}
4444
}
@@ -50,13 +50,13 @@ static bool hasMoveConstructor(CXXRecordDecl const &Node) {
5050
return false;
5151
}
5252

53-
static bool hasCopyAssignment(CXXRecordDecl const &Node) {
53+
static bool isCopyAssignable(CXXRecordDecl const &Node) {
5454
if (Node.needsOverloadResolutionForCopyAssignment() &&
5555
Node.needsImplicitCopyAssignment()) {
5656
// unresolved
5757
for (CXXBaseSpecifier const &BS : Node.bases()) {
5858
CXXRecordDecl const *BRD = BS.getType()->getAsCXXRecordDecl();
59-
if (BRD != nullptr && !hasCopyAssignment(*BRD))
59+
if (BRD != nullptr && !isCopyAssignable(*BRD))
6060
return false;
6161
}
6262
}
@@ -68,13 +68,13 @@ static bool hasCopyAssignment(CXXRecordDecl const &Node) {
6868
return false;
6969
}
7070

71-
static bool hasMoveAssignment(CXXRecordDecl const &Node) {
71+
static bool isMoveAssignable(CXXRecordDecl const &Node) {
7272
if (Node.needsOverloadResolutionForMoveAssignment() &&
7373
Node.needsImplicitMoveAssignment()) {
7474
// unresolved
7575
for (CXXBaseSpecifier const &BS : Node.bases()) {
7676
CXXRecordDecl const *BRD = BS.getType()->getAsCXXRecordDecl();
77-
if (BRD != nullptr && !hasMoveAssignment(*BRD))
77+
if (BRD != nullptr && !isMoveAssignable(*BRD))
7878
return false;
7979
}
8080
}
@@ -93,8 +93,8 @@ AST_MATCHER(FieldDecl, isMemberOfLambda) {
9393
}
9494

9595
AST_MATCHER(CXXRecordDecl, isCopyableOrMovable) {
96-
return hasCopyConstructor(Node) || hasMoveConstructor(Node) ||
97-
hasCopyAssignment(Node) || hasMoveAssignment(Node);
96+
return isCopyConstructible(Node) || isMoveConstructible(Node) ||
97+
isCopyAssignable(Node) || isMoveAssignable(Node);
9898
}
9999

100100
} // namespace

0 commit comments

Comments
 (0)