[clang] [clang-tools-extra] [clang][refactor] Refactor `findNextTokenIncludingComments` (PR #123060)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 16 00:53:23 PST 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 6affc1837537a802531a5394535f1f0b7ca865cb 66acd22f1de097e23eaafe7e5fe20168727f9d82 --extensions cpp,h -- clang-tools-extra/clang-reorder-fields/ReorderFieldsAction.cpp clang-tools-extra/clang-tidy/utils/LexerUtils.cpp clang-tools-extra/clang-tidy/utils/LexerUtils.h clang/include/clang/Lex/Lexer.h clang/lib/Lex/Lexer.cpp clang/unittests/Lex/LexerTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/unittests/Lex/LexerTest.cpp b/clang/unittests/Lex/LexerTest.cpp
index 7b05844589..c897998cab 100644
--- a/clang/unittests/Lex/LexerTest.cpp
+++ b/clang/unittests/Lex/LexerTest.cpp
@@ -635,8 +635,9 @@ TEST_F(LexerTest, FindNextTokenIncludingComments) {
GeneratedByNextToken.push_back(getSourceText(*T, *T));
Loc = T->getLocation();
}
- EXPECT_THAT(GeneratedByNextToken, ElementsAre("abcd", "=", "0", ";", "// A comment.", "int",
- "xyz", "=", "abcd", ";"));
+ EXPECT_THAT(GeneratedByNextToken,
+ ElementsAre("abcd", "=", "0", ";", "// A comment.", "int", "xyz",
+ "=", "abcd", ";"));
}
TEST_F(LexerTest, CreatedFIDCountForPredefinedBuffer) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/123060
More information about the cfe-commits
mailing list