Skip to content

Conversation

@kazutakahirata
Copy link
Contributor

Identified with modernize-loop-convert.

Identified with modernize-loop-convert.
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" labels Nov 22, 2025
@llvmbot
Copy link
Member

llvmbot commented Nov 22, 2025

@llvm/pr-subscribers-clang

Author: Kazu Hirata (kazutakahirata)

Changes

Identified with modernize-loop-convert.


Full diff: https://github.com/llvm/llvm-project/pull/169174.diff

1 Files Affected:

  • (modified) clang/lib/Lex/Preprocessor.cpp (+2-4)
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp index e003ad3a95570..0a25dc19548ec 100644 --- a/clang/lib/Lex/Preprocessor.cpp +++ b/clang/lib/Lex/Preprocessor.cpp @@ -1458,10 +1458,8 @@ void Preprocessor::removeCommentHandler(CommentHandler *Handler) { bool Preprocessor::HandleComment(Token &result, SourceRange Comment) { bool AnyPendingTokens = false; - for (std::vector<CommentHandler *>::iterator H = CommentHandlers.begin(), - HEnd = CommentHandlers.end(); - H != HEnd; ++H) { - if ((*H)->HandleComment(*this, Comment)) + for (CommentHandler *H : CommentHandlers) { + if (H->HandleComment(*this, Comment)) AnyPendingTokens = true; } if (!AnyPendingTokens || getCommentRetentionState()) 
@kazutakahirata kazutakahirata merged commit c593993 into llvm:main Nov 22, 2025
13 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20251122_clang_tidy_modernize-loop-convert_Lex branch November 22, 2025 23:31
aadeshps-mcw pushed a commit to aadeshps-mcw/llvm-project that referenced this pull request Nov 26, 2025
Identified with modernize-loop-convert.
Priyanshu3820 pushed a commit to Priyanshu3820/llvm-project that referenced this pull request Nov 26, 2025
Identified with modernize-loop-convert.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category

3 participants