Skip to content

Commit 027899d

Browse files
committed
Remove references to the ast_type_traits namespace
Follow up to cd62511 / https://reviews.llvm.org/D74499 Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D92994
1 parent 76c36c1 commit 027899d

File tree

97 files changed

+395
-469
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+395
-469
lines changed

clang-tools-extra/clang-query/Query.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ template <> struct SetQueryKind<OutputKind> {
120120
static const QueryKind value = QK_SetOutputKind;
121121
};
122122

123-
template <> struct SetQueryKind<ast_type_traits::TraversalKind> {
123+
template <> struct SetQueryKind<TraversalKind> {
124124
static const QueryKind value = QK_SetTraversalKind;
125125
};
126126

clang-tools-extra/clang-query/QueryParser.cpp

+4-7
Original file line numberDiff line numberDiff line change
@@ -128,20 +128,17 @@ template <typename QueryType> QueryRef QueryParser::parseSetOutputKind() {
128128
llvm_unreachable("Invalid output kind");
129129
}
130130

131-
QueryRef QueryParser::parseSetTraversalKind(
132-
ast_type_traits::TraversalKind QuerySession::*Var) {
131+
QueryRef QueryParser::parseSetTraversalKind(TraversalKind QuerySession::*Var) {
133132
StringRef ValStr;
134133
unsigned Value =
135134
LexOrCompleteWord<unsigned>(this, ValStr)
136-
.Case("AsIs", ast_type_traits::TK_AsIs)
137-
.Case("IgnoreUnlessSpelledInSource",
138-
ast_type_traits::TK_IgnoreUnlessSpelledInSource)
135+
.Case("AsIs", TK_AsIs)
136+
.Case("IgnoreUnlessSpelledInSource", TK_IgnoreUnlessSpelledInSource)
139137
.Default(~0u);
140138
if (Value == ~0u) {
141139
return new InvalidQuery("expected traversal kind, got '" + ValStr + "'");
142140
}
143-
return new SetQuery<ast_type_traits::TraversalKind>(
144-
Var, static_cast<ast_type_traits::TraversalKind>(Value));
141+
return new SetQuery<TraversalKind>(Var, static_cast<TraversalKind>(Value));
145142
}
146143

147144
QueryRef QueryParser::endQuery(QueryRef Q) {

clang-tools-extra/clang-query/QueryParser.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ class QueryParser {
4343
template <typename T> struct LexOrCompleteWord;
4444

4545
QueryRef parseSetBool(bool QuerySession::*Var);
46-
QueryRef
47-
parseSetTraversalKind(ast_type_traits::TraversalKind QuerySession::*Var);
46+
QueryRef parseSetTraversalKind(TraversalKind QuerySession::*Var);
4847
template <typename QueryType> QueryRef parseSetOutputKind();
4948
QueryRef completeMatcherExpression();
5049

clang-tools-extra/clang-query/QuerySession.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class QuerySession {
2626
QuerySession(llvm::ArrayRef<std::unique_ptr<ASTUnit>> ASTs)
2727
: ASTs(ASTs), PrintOutput(false), DiagOutput(true),
2828
DetailedASTOutput(false), BindRoot(true), PrintMatcher(false),
29-
Terminate(false), TK(ast_type_traits::TK_AsIs) {}
29+
Terminate(false), TK(TK_AsIs) {}
3030

3131
llvm::ArrayRef<std::unique_ptr<ASTUnit>> ASTs;
3232

@@ -38,7 +38,7 @@ class QuerySession {
3838
bool PrintMatcher;
3939
bool Terminate;
4040

41-
ast_type_traits::TraversalKind TK;
41+
TraversalKind TK;
4242
llvm::StringMap<ast_matchers::dynamic::VariantValue> NamedValues;
4343
};
4444

clang-tools-extra/clang-tidy/abseil/FasterStrsplitDelimiterCheck.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void FasterStrsplitDelimiterCheck::registerMatchers(MatchFinder *Finder) {
7979
// Find uses of absl::StrSplit(..., "x") and absl::StrSplit(...,
8080
// absl::ByAnyChar("x")) to transform them into absl::StrSplit(..., 'x').
8181
Finder->addMatcher(
82-
traverse(ast_type_traits::TK_AsIs,
82+
traverse(TK_AsIs,
8383
callExpr(callee(functionDecl(hasName("::absl::StrSplit"))),
8484
hasArgument(1, anyOf(ByAnyCharArg, SingleChar)),
8585
unless(isInTemplateInstantiation()))
@@ -90,7 +90,7 @@ void FasterStrsplitDelimiterCheck::registerMatchers(MatchFinder *Finder) {
9090
// absl::MaxSplits(absl::ByAnyChar("x"), N) to transform them into
9191
// absl::MaxSplits('x', N).
9292
Finder->addMatcher(
93-
traverse(ast_type_traits::TK_AsIs,
93+
traverse(TK_AsIs,
9494
callExpr(callee(functionDecl(hasName("::absl::MaxSplits"))),
9595
hasArgument(0, anyOf(ByAnyCharArg,
9696
ignoringParenCasts(SingleChar))),

clang-tools-extra/clang-tidy/abseil/RedundantStrcatCallsCheck.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const clang::CallExpr* ProcessArgument(const Expr* Arg,
6868
has(callExpr(callee(functionDecl(*Strcat))).bind("StrCat")));
6969
if (const auto *SubStrcatCall = selectFirst<const CallExpr>(
7070
"StrCat",
71-
match(stmt(traverse(ast_type_traits::TK_AsIs,
71+
match(stmt(traverse(TK_AsIs,
7272
anyOf(cxxConstructExpr(IsAlphanum,
7373
hasArgument(0, IsStrcat)),
7474
IsStrcat))),

clang-tools-extra/clang-tidy/abseil/StrCatAppendCheck.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ void StrCatAppendCheck::registerMatchers(MatchFinder *Finder) {
5858
// StrCat on the RHS. The first argument of the StrCat call should be the same
5959
// as the LHS. Ignore calls from template instantiations.
6060
Finder->addMatcher(
61-
traverse(ast_type_traits::TK_AsIs,
61+
traverse(TK_AsIs,
6262
cxxOperatorCallExpr(
6363
unless(isInTemplateInstantiation()),
6464
hasOverloadedOperatorName("="),

clang-tools-extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.cpp

+11-12
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,16 @@ void UpgradeDurationConversionsCheck::registerMatchers(MatchFinder *Finder) {
100100
// `absl::Hours(x)`
101101
// where `x` is not of a built-in type.
102102
Finder->addMatcher(
103-
traverse(
104-
ast_type_traits::TK_AsIs,
105-
implicitCastExpr(anyOf(hasCastKind(CK_UserDefinedConversion),
106-
has(implicitCastExpr(
107-
hasCastKind(CK_UserDefinedConversion)))),
108-
hasParent(callExpr(
109-
callee(functionDecl(
110-
DurationFactoryFunction(),
111-
unless(hasParent(functionTemplateDecl())))),
112-
hasArgument(0, expr().bind("arg")))))
113-
.bind("OuterExpr")),
103+
traverse(TK_AsIs, implicitCastExpr(
104+
anyOf(hasCastKind(CK_UserDefinedConversion),
105+
has(implicitCastExpr(
106+
hasCastKind(CK_UserDefinedConversion)))),
107+
hasParent(callExpr(
108+
callee(functionDecl(
109+
DurationFactoryFunction(),
110+
unless(hasParent(functionTemplateDecl())))),
111+
hasArgument(0, expr().bind("arg")))))
112+
.bind("OuterExpr")),
114113
this);
115114
}
116115

@@ -120,7 +119,7 @@ void UpgradeDurationConversionsCheck::check(
120119
"implicit conversion to 'int64_t' is deprecated in this context; use an "
121120
"explicit cast instead";
122121

123-
TraversalKindScope RAII(*Result.Context, ast_type_traits::TK_AsIs);
122+
TraversalKindScope RAII(*Result.Context, TK_AsIs);
124123

125124
const auto *ArgExpr = Result.Nodes.getNodeAs<Expr>("arg");
126125
SourceLocation Loc = ArgExpr->getBeginLoc();

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,7 @@ void AssertSideEffectCheck::storeOptions(ClangTidyOptions::OptionMap &Opts) {
8484

8585
void AssertSideEffectCheck::registerMatchers(MatchFinder *Finder) {
8686
auto DescendantWithSideEffect =
87-
traverse(ast_type_traits::TK_AsIs,
88-
hasDescendant(expr(hasSideEffect(CheckFunctionCalls))));
87+
traverse(TK_AsIs, hasDescendant(expr(hasSideEffect(CheckFunctionCalls))));
8988
auto ConditionWithSideEffect = hasCondition(DescendantWithSideEffect);
9089
Finder->addMatcher(
9190
stmt(

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ void BoolPointerImplicitConversionCheck::registerMatchers(MatchFinder *Finder) {
1919
// condition. Filter negations.
2020
Finder->addMatcher(
2121
traverse(
22-
ast_type_traits::TK_AsIs,
22+
TK_AsIs,
2323
ifStmt(
2424
hasCondition(findAll(implicitCastExpr(
2525
unless(hasParent(unaryOperator(hasOperatorName("!")))),

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

+7-7
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ void DanglingHandleCheck::registerMatchersForVariables(MatchFinder *Finder) {
117117

118118
// Find 'Handle foo = ReturnsAValue();'
119119
Finder->addMatcher(
120-
traverse(ast_type_traits::TK_AsIs,
120+
traverse(TK_AsIs,
121121
varDecl(hasType(hasUnqualifiedDesugaredType(recordType(
122122
hasDeclaration(cxxRecordDecl(IsAHandle))))),
123123
unless(parmVarDecl()),
@@ -128,24 +128,24 @@ void DanglingHandleCheck::registerMatchersForVariables(MatchFinder *Finder) {
128128
this);
129129
// Find 'foo = ReturnsAValue(); // foo is Handle'
130130
Finder->addMatcher(
131-
traverse(ast_type_traits::TK_AsIs,
131+
traverse(TK_AsIs,
132132
cxxOperatorCallExpr(callee(cxxMethodDecl(ofClass(IsAHandle))),
133133
hasOverloadedOperatorName("="),
134134
hasArgument(1, ConvertedHandle))
135135
.bind("bad_stmt")),
136136
this);
137137

138138
// Container insertions that will dangle.
139-
Finder->addMatcher(traverse(ast_type_traits::TK_AsIs,
140-
makeContainerMatcher(IsAHandle).bind("bad_stmt")),
141-
this);
139+
Finder->addMatcher(
140+
traverse(TK_AsIs, makeContainerMatcher(IsAHandle).bind("bad_stmt")),
141+
this);
142142
}
143143

144144
void DanglingHandleCheck::registerMatchersForReturn(MatchFinder *Finder) {
145145
// Return a local.
146146
Finder->addMatcher(
147147
traverse(
148-
ast_type_traits::TK_AsIs,
148+
TK_AsIs,
149149
returnStmt(
150150
// The AST contains two constructor calls:
151151
// 1. Value to Handle conversion.
@@ -170,7 +170,7 @@ void DanglingHandleCheck::registerMatchersForReturn(MatchFinder *Finder) {
170170
// Return a temporary.
171171
Finder->addMatcher(
172172
traverse(
173-
ast_type_traits::TK_AsIs,
173+
TK_AsIs,
174174
returnStmt(has(exprWithCleanups(has(ignoringParenImpCasts(handleFrom(
175175
IsAHandle, handleFromTemporaryValue(IsAHandle)))))))
176176
.bind("bad_stmt")),

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void InaccurateEraseCheck::registerMatchers(MatchFinder *Finder) {
3333
tagType(hasDeclaration(decl(isInStdNamespace())))));
3434
Finder->addMatcher(
3535
traverse(
36-
ast_type_traits::TK_AsIs,
36+
TK_AsIs,
3737
cxxMemberCallExpr(
3838
on(anyOf(hasType(DeclInStd), hasType(pointsTo(DeclInStd)))),
3939
callee(cxxMethodDecl(hasName("erase"))), argumentCountIs(1),

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void IncorrectRoundingsCheck::registerMatchers(MatchFinder *MatchFinder) {
5151
// Find expressions of cast to int of the sum of a floating point expression
5252
// and 0.5.
5353
MatchFinder->addMatcher(
54-
traverse(ast_type_traits::TK_AsIs,
54+
traverse(TK_AsIs,
5555
implicitCastExpr(hasImplicitDestinationType(isInteger()),
5656
ignoringParenCasts(binaryOperator(
5757
hasOperatorName("+"), OneSideHalf)))

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ void IntegerDivisionCheck::registerMatchers(MatchFinder *Finder) {
3030
callExpr(IntType), explicitCastExpr(IntType), UnaryOperators);
3131

3232
Finder->addMatcher(
33-
traverse(ast_type_traits::TK_AsIs,
33+
traverse(TK_AsIs,
3434
binaryOperator(
3535
hasOperatorName("/"), hasLHS(expr(IntType)),
3636
hasRHS(expr(IntType)),

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

+7-9
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,17 @@ void MisplacedOperatorInStrlenInAllocCheck::registerMatchers(
5555
declRefExpr(hasDeclaration(Alloc1Func)))));
5656

5757
Finder->addMatcher(
58-
traverse(ast_type_traits::TK_AsIs,
59-
callExpr(callee(decl(anyOf(Alloc0Func, Alloc0FuncPtr))),
60-
hasArgument(0, BadArg))
61-
.bind("Alloc")),
58+
traverse(TK_AsIs, callExpr(callee(decl(anyOf(Alloc0Func, Alloc0FuncPtr))),
59+
hasArgument(0, BadArg))
60+
.bind("Alloc")),
6261
this);
6362
Finder->addMatcher(
64-
traverse(ast_type_traits::TK_AsIs,
65-
callExpr(callee(decl(anyOf(Alloc1Func, Alloc1FuncPtr))),
66-
hasArgument(1, BadArg))
67-
.bind("Alloc")),
63+
traverse(TK_AsIs, callExpr(callee(decl(anyOf(Alloc1Func, Alloc1FuncPtr))),
64+
hasArgument(1, BadArg))
65+
.bind("Alloc")),
6866
this);
6967
Finder->addMatcher(
70-
traverse(ast_type_traits::TK_AsIs,
68+
traverse(TK_AsIs,
7169
cxxNewExpr(isArray(), hasArraySize(BadArg)).bind("Alloc")),
7270
this);
7371
}

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ void MisplacedWideningCastCheck::registerMatchers(MatchFinder *Finder) {
4040
implicitCastExpr(hasImplicitDestinationType(isInteger()),
4141
has(ignoringParenImpCasts(Calc)));
4242
const auto Cast =
43-
traverse(ast_type_traits::TK_AsIs,
44-
expr(anyOf(ExplicitCast, ImplicitCast)).bind("Cast"));
43+
traverse(TK_AsIs, expr(anyOf(ExplicitCast, ImplicitCast)).bind("Cast"));
4544

4645
Finder->addMatcher(varDecl(hasInitializer(Cast)), this);
4746
Finder->addMatcher(returnStmt(hasReturnValue(Cast)), this);

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static std::string getExprAsString(const clang::Expr &E,
8484
void ParentVirtualCallCheck::registerMatchers(MatchFinder *Finder) {
8585
Finder->addMatcher(
8686
traverse(
87-
ast_type_traits::TK_AsIs,
87+
TK_AsIs,
8888
cxxMemberCallExpr(
8989
callee(memberExpr(hasDescendant(implicitCastExpr(
9090
hasImplicitDestinationType(pointsTo(

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

+2-3
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,8 @@ BindableMatcher<clang::Stmt> SignedCharMisuseCheck::charCastExpression(
7070
// We catch any type of casts to an integer. We need to have these cast
7171
// expressions explicitly to catch only those casts which are direct children
7272
// of the checked expressions. (e.g. assignment, declaration).
73-
return traverse(ast_type_traits::TK_AsIs,
74-
expr(anyOf(ImplicitCastExpr, CStyleCastExpr, StaticCastExpr,
75-
FunctionalCastExpr)));
73+
return traverse(TK_AsIs, expr(anyOf(ImplicitCastExpr, CStyleCastExpr,
74+
StaticCastExpr, FunctionalCastExpr)));
7675
}
7776

7877
void SignedCharMisuseCheck::registerMatchers(MatchFinder *Finder) {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ bool isConcatenatedLiteralsOnPurpose(ASTContext *Ctx,
2323
// String literals surrounded by parentheses are assumed to be on purpose.
2424
// i.e.: const char* Array[] = { ("a" "b" "c"), "d", [...] };
2525

26-
TraversalKindScope RAII(*Ctx, ast_type_traits::TK_AsIs);
26+
TraversalKindScope RAII(*Ctx, TK_AsIs);
2727
auto Parents = Ctx->getParents(*Lit);
2828
if (Parents.size() == 1 && Parents[0].get<ParenExpr>() != nullptr)
2929
return true;

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ void SuspiciousStringCompareCheck::registerMatchers(MatchFinder *Finder) {
135135

136136
// Detect suspicious cast to an inconsistant type (i.e. not integer type).
137137
Finder->addMatcher(
138-
traverse(ast_type_traits::TK_AsIs,
138+
traverse(TK_AsIs,
139139
implicitCastExpr(unless(hasType(isInteger())),
140140
hasSourceExpression(StringCompareCallExpr))
141141
.bind("invalid-conversion")),

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

+2-3
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,8 @@ void TooSmallLoopVariableCheck::registerMatchers(MatchFinder *Finder) {
5757
.bind(LoopVarName);
5858

5959
// We need to catch only those comparisons which contain any integer cast.
60-
StatementMatcher LoopVarConversionMatcher =
61-
traverse(ast_type_traits::TK_AsIs,
62-
implicitCastExpr(hasImplicitDestinationType(isInteger()),
60+
StatementMatcher LoopVarConversionMatcher = traverse(
61+
TK_AsIs, implicitCastExpr(hasImplicitDestinationType(isInteger()),
6362
has(ignoringParenImpCasts(LoopVarMatcher)))
6463
.bind(LoopVarCastName));
6564

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void UndelegatedConstructorCheck::registerMatchers(MatchFinder *Finder) {
5656

5757
Finder->addMatcher(
5858
traverse(
59-
ast_type_traits::TK_AsIs,
59+
TK_AsIs,
6060
compoundStmt(hasParent(cxxConstructorDecl(
6161
ofClass(cxxRecordDecl().bind("parent")))),
6262
forEach(ignoringTemporaryExpr(

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void UnhandledSelfAssignmentCheck::registerMatchers(MatchFinder *Finder) {
5252
// In the non-template case, we can search for the copy constructor call.
5353
const auto HasNonTemplateSelfCopy = cxxMethodDecl(
5454
ofClass(cxxRecordDecl(unless(hasAncestor(classTemplateDecl())))),
55-
traverse(ast_type_traits::TK_AsIs,
55+
traverse(TK_AsIs,
5656
hasDescendant(cxxConstructExpr(hasDeclaration(cxxConstructorDecl(
5757
isCopyConstructor(), ofClass(equalsBoundNode("class"))))))));
5858

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void UnusedRaiiCheck::registerMatchers(MatchFinder *Finder) {
3232
unless(has(ignoringParenImpCasts(objcMessageExpr()))))
3333
.bind("temp");
3434
Finder->addMatcher(
35-
traverse(ast_type_traits::TK_AsIs,
35+
traverse(TK_AsIs,
3636
exprWithCleanups(
3737
unless(isInTemplateInstantiation()),
3838
hasParent(compoundStmt().bind("compound")),

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

+4-5
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,8 @@ void UseAfterMoveFinder::getDeclRefs(
275275
unless(inDecltypeOrTemplateArg()))
276276
.bind("declref");
277277

278-
addDeclRefs(
279-
match(traverse(ast_type_traits::TK_AsIs, findAll(DeclRefMatcher)),
280-
*S->getStmt(), *Context));
278+
addDeclRefs(match(traverse(TK_AsIs, findAll(DeclRefMatcher)), *S->getStmt(),
279+
*Context));
281280
addDeclRefs(match(findAll(cxxOperatorCallExpr(
282281
hasAnyOverloadedOperatorName("*", "->", "[]"),
283282
hasArgument(0, DeclRefMatcher))
@@ -342,7 +341,7 @@ void UseAfterMoveFinder::getReinits(
342341
// Passing variable to a function as a non-const lvalue reference
343342
// (unless that function is std::move()).
344343
callExpr(forEachArgumentWithParam(
345-
traverse(ast_type_traits::TK_AsIs, DeclRefMatcher),
344+
traverse(TK_AsIs, DeclRefMatcher),
346345
unless(parmVarDecl(hasType(
347346
references(qualType(isConstQualified())))))),
348347
unless(callee(functionDecl(hasName("::std::move")))))))
@@ -406,7 +405,7 @@ void UseAfterMoveCheck::registerMatchers(MatchFinder *Finder) {
406405

407406
Finder->addMatcher(
408407
traverse(
409-
ast_type_traits::TK_AsIs,
408+
TK_AsIs,
410409
// To find the Stmt that we assume performs the actual move, we look
411410
// for the direct ancestor of the std::move() that isn't one of the
412411
// node types ignored by ignoringParenImpCasts().

clang-tools-extra/clang-tidy/cert/MutatingCopyCheck.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ void MutatingCopyCheck::registerMatchers(MatchFinder *Finder) {
3030
MemberExprOrSourceObject);
3131

3232
const auto IsSourceMutatingAssignment = traverse(
33-
ast_type_traits::TK_AsIs,
33+
TK_AsIs,
3434
expr(anyOf(binaryOperator(isAssignmentOperator(), hasLHS(IsPartOfSource))
3535
.bind(MutatingOperatorName),
3636
cxxOperatorCallExpr(isAssignmentOperator(),

clang-tools-extra/clang-tidy/cert/ProperlySeededRandomGeneratorCheck.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void ProperlySeededRandomGeneratorCheck::registerMatchers(MatchFinder *Finder) {
6262
// std::mt19937 engine(x);
6363
// ^
6464
Finder->addMatcher(
65-
traverse(ast_type_traits::TK_AsIs,
65+
traverse(TK_AsIs,
6666
cxxConstructExpr(RandomGeneratorEngineTypeMatcher).bind("ctor")),
6767
this);
6868

0 commit comments

Comments
 (0)