diff options
| author | Owen Pan <owenpiano@gmail.com> | 2025-01-04 16:19:46 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-04 16:19:46 -0800 |
| commit | 04610b901f41c4abec169b9a38f1b0a2fde976c1 (patch) | |
| tree | 711672e046239257ee7e3b03993eef59b152ff82 /clang/lib/Format/FormatTokenLexer.cpp | |
| parent | 66f16e682f84551552099a45e608fa260b14e3ab (diff) | |
[clang-format][NFC] Replace SmallVectorImpl with ArrayRef (#121621)
Diffstat (limited to 'clang/lib/Format/FormatTokenLexer.cpp')
| -rw-r--r-- | clang/lib/Format/FormatTokenLexer.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Format/FormatTokenLexer.cpp b/clang/lib/Format/FormatTokenLexer.cpp index 0f8d4940d436..a1d7eeadec44 100644 --- a/clang/lib/Format/FormatTokenLexer.cpp +++ b/clang/lib/Format/FormatTokenLexer.cpp @@ -564,8 +564,7 @@ bool FormatTokenLexer::tryMergeTokens(ArrayRef<tok::TokenKind> Kinds, if (Tokens.size() < Kinds.size()) return false; - SmallVectorImpl<FormatToken *>::const_iterator First = - Tokens.end() - Kinds.size(); + const auto *First = Tokens.end() - Kinds.size(); for (unsigned i = 0; i < Kinds.size(); ++i) if (First[i]->isNot(Kinds[i])) return false; @@ -577,7 +576,7 @@ bool FormatTokenLexer::tryMergeTokens(size_t Count, TokenType NewType) { if (Tokens.size() < Count) return false; - SmallVectorImpl<FormatToken *>::const_iterator First = Tokens.end() - Count; + const auto *First = Tokens.end() - Count; unsigned AddLength = 0; for (size_t i = 1; i < Count; ++i) { // If there is whitespace separating the token and the previous one, |
