From: Owen Pan Date: Sun, 1 Jan 2023 06:06:28 +0000 (-0800) Subject: [clang-format][NFC] Clean up IntegerLiteralSeparatorFixer::process X-Git-Tag: upstream/17.0.6~22396 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b027cdc5b99f56fdfe6c6dbb05188675b94a1aa5;p=platform%2Fupstream%2Fllvm.git [clang-format][NFC] Clean up IntegerLiteralSeparatorFixer::process --- diff --git a/clang/lib/Format/IntegerLiteralSeparatorFixer.cpp b/clang/lib/Format/IntegerLiteralSeparatorFixer.cpp index 4082a1c..ef07ab0 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;