diff options
| author | Kazu Hirata <kazu@google.com> | 2025-11-22 15:30:51 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-22 15:30:51 -0800 |
| commit | c5939937a4d1b7da4477762389dee0afa756bd9c (patch) | |
| tree | 81a5044d8667422098b44f405721b8cb669d965c /clang | |
| parent | b296386d2ca8595c23bc2f90eef902f3c485b1a0 (diff) | |
[Lex] Use a range-based for loop (NFC) (#169174)
Identified with modernize-loop-convert.
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/Lex/Preprocessor.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp index e003ad3a9557..0a25dc19548e 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()) |
