Skip to content

Commit 4e28bb4

Browse files
committed
Change type1, type2 to srcType, dstType
1 parent ff65fcc commit 4e28bb4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

clang-tools-extra/clang-tidy/readability/RedundantCastingCheck.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,29 +112,29 @@ void RedundantCastingCheck::registerMatchers(MatchFinder *Finder) {
112112
unless(hasCastKind(CK_UserDefinedConversion)),
113113
unless(cxxFunctionalCastExpr(hasDestinationType(unless(SimpleType)))),
114114

115-
hasDestinationType(qualType().bind("type2")),
115+
hasDestinationType(qualType().bind("dstType")),
116116
hasSourceExpression(anyOf(
117117
expr(unless(initListExpr()), unless(BitfieldMemberExpr),
118-
hasType(qualType().bind("type1")))
118+
hasType(qualType().bind("srcType")))
119119
.bind("source"),
120120
initListExpr(unless(hasInit(1, expr())),
121121
hasInit(0, expr(unless(BitfieldMemberExpr),
122-
hasType(qualType().bind("type1")))
122+
hasType(qualType().bind("srcType")))
123123
.bind("source"))))))
124124
.bind("cast"),
125125
this);
126126
}
127127

128128
void RedundantCastingCheck::check(const MatchFinder::MatchResult &Result) {
129129
const auto *SourceExpr = Result.Nodes.getNodeAs<Expr>("source");
130-
auto TypeD = *Result.Nodes.getNodeAs<QualType>("type2");
130+
auto TypeD = *Result.Nodes.getNodeAs<QualType>("dstType");
131131

132132
if (SourceExpr->getValueKind() == VK_LValue &&
133133
TypeD.getCanonicalType()->isRValueReferenceType())
134134
return;
135135

136136
const auto TypeS =
137-
Result.Nodes.getNodeAs<QualType>("type1")->getNonReferenceType();
137+
Result.Nodes.getNodeAs<QualType>("srcType")->getNonReferenceType();
138138
TypeD = TypeD.getNonReferenceType();
139139

140140
if (!areTypesEquals(TypeS, TypeD, IgnoreTypeAliases))

0 commit comments

Comments
 (0)