Skip to content

Commit e20800c

Browse files
committed
[clang-format][NFC] Test IsQualifier only needs to call the lexer
1 parent c72e943 commit e20800c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

clang/unittests/Format/QualifierFixerTest.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,9 @@ TEST_F(QualifierFixerTest, IsQualifierType) {
10551055
ConfiguredTokens.push_back(tok::kw_constexpr);
10561056
ConfiguredTokens.push_back(tok::kw_friend);
10571057

1058-
auto Tokens = annotate(
1058+
TestLexer lexer{Allocator, Buffers};
1059+
1060+
auto Tokens = lexer.lex(
10591061
"const static inline auto restrict int double long constexpr friend");
10601062
ASSERT_EQ(Tokens.size(), 11u) << Tokens;
10611063

@@ -1081,7 +1083,7 @@ TEST_F(QualifierFixerTest, IsQualifierType) {
10811083
EXPECT_TRUE(isQualifierOrType(Tokens[8]));
10821084
EXPECT_TRUE(isQualifierOrType(Tokens[9]));
10831085

1084-
auto NotTokens = annotate("for while do Foo Bar ");
1086+
auto NotTokens = lexer.lex("for while do Foo Bar ");
10851087
ASSERT_EQ(NotTokens.size(), 6u) << Tokens;
10861088

10871089
EXPECT_FALSE(isConfiguredQualifierOrType(NotTokens[0], ConfiguredTokens));

0 commit comments

Comments
 (0)