[clang] b027cdc - [clang-format][NFC] Clean up IntegerLiteralSeparatorFixer::process
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 1 14:49:21 PST 2023
Author: Owen Pan
Date: 2023-01-01T14:49:12-08:00
New Revision: b027cdc5b99f56fdfe6c6dbb05188675b94a1aa5
URL: https://github.com/llvm/llvm-project/commit/b027cdc5b99f56fdfe6c6dbb05188675b94a1aa5
DIFF: https://github.com/llvm/llvm-project/commit/b027cdc5b99f56fdfe6c6dbb05188675b94a1aa5.diff
LOG: [clang-format][NFC] Clean up IntegerLiteralSeparatorFixer::process
Added:
Modified:
clang/lib/Format/IntegerLiteralSeparatorFixer.cpp
Removed:
################################################################################
diff --git a/clang/lib/Format/IntegerLiteralSeparatorFixer.cpp b/clang/lib/Format/IntegerLiteralSeparatorFixer.cpp
index 4082a1cf8385..ef07ab06760b 100644
--- a/clang/lib/Format/IntegerLiteralSeparatorFixer.cpp
+++ b/clang/lib/Format/IntegerLiteralSeparatorFixer.cpp
@@ -78,10 +78,9 @@ IntegerLiteralSeparatorFixer::process(const Environment &Env,
Lex.SetCommentRetentionState(true);
Token Tok;
- Lex.LexFromRawLexer(Tok);
-
tooling::Replacements Result;
- for (bool Skip = false; Tok.isNot(tok::eof); Lex.LexFromRawLexer(Tok)) {
+
+ for (bool Skip = false; !Lex.LexFromRawLexer(Tok);) {
auto Length = Tok.getLength();
if (Length < 2)
continue;
More information about the cfe-commits
mailing list