File tree 4 files changed +4
-8
lines changed 4 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -171,8 +171,7 @@ void SuspiciousEnumUsageCheck::check(const MatchFinder::MatchResult &Result) {
171
171
// Skip when one of the parameters is an empty enum. The
172
172
// hasDisjointValueRange function could not decide the values properly in
173
173
// case of an empty enum.
174
- if (EnumDec->enumerator_begin () == EnumDec->enumerator_end () ||
175
- OtherEnumDec->enumerator_begin () == OtherEnumDec->enumerator_end ())
174
+ if (EnumDec->enumerators ().empty () || OtherEnumDec->enumerators ().empty ())
176
175
return ;
177
176
178
177
if (!hasDisjointValueRange (EnumDec, OtherEnumDec))
Original file line number Diff line number Diff line change @@ -67,8 +67,7 @@ static std::string createReplacementText(const LambdaExpr *Lambda) {
67
67
AppendName (" this" );
68
68
}
69
69
}
70
- if (!Replacement.empty () &&
71
- Lambda->explicit_capture_begin () != Lambda->explicit_capture_end ()) {
70
+ if (!Replacement.empty () && !Lambda->explicit_captures ().empty ()) {
72
71
// Add back separator if we are adding explicit capture variables.
73
72
Stream << " , " ;
74
73
}
Original file line number Diff line number Diff line change @@ -192,9 +192,7 @@ void UnusedParametersCheck::check(const MatchFinder::MatchResult &Result) {
192
192
193
193
// In non-strict mode ignore function definitions with empty bodies
194
194
// (constructor initializer counts for non-empty body).
195
- if (StrictMode ||
196
- (Function->getBody ()->child_begin () !=
197
- Function->getBody ()->child_end ()) ||
195
+ if (StrictMode || !Function->getBody ()->children ().empty () ||
198
196
(isa<CXXConstructorDecl>(Function) &&
199
197
cast<CXXConstructorDecl>(Function)->getNumCtorInitializers () > 0 ))
200
198
warnOnUnusedParameter (Result, Function, I);
Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ findInsertionForConstraint(const FunctionDecl *Function, ASTContext &Context) {
254
254
return utils::lexer::findPreviousTokenKind (Init->getSourceLocation (),
255
255
SM, LangOpts, tok::colon);
256
256
}
257
- if (Constructor->init_begin () != Constructor-> init_end ())
257
+ if (! Constructor->inits (). empty ())
258
258
return std::nullopt;
259
259
}
260
260
if (Function->isDeleted ()) {
You can’t perform that action at this time.
0 commit comments