Skip to content

Commit c593993

Browse files
[Lex] Use a range-based for loop (NFC) (#169174)
Identified with modernize-loop-convert.
1 parent b296386 commit c593993

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

clang/lib/Lex/Preprocessor.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1458,10 +1458,8 @@ void Preprocessor::removeCommentHandler(CommentHandler *Handler) {
14581458

14591459
bool Preprocessor::HandleComment(Token &result, SourceRange Comment) {
14601460
bool AnyPendingTokens = false;
1461-
for (std::vector<CommentHandler *>::iterator H = CommentHandlers.begin(),
1462-
HEnd = CommentHandlers.end();
1463-
H != HEnd; ++H) {
1464-
if ((*H)->HandleComment(*this, Comment))
1461+
for (CommentHandler *H : CommentHandlers) {
1462+
if (H->HandleComment(*this, Comment))
14651463
AnyPendingTokens = true;
14661464
}
14671465
if (!AnyPendingTokens || getCommentRetentionState())

0 commit comments

Comments
 (0)