aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Lex/LexerTest.cpp
diff options
context:
space:
mode:
authorKadir Cetinkaya <kadircet@google.com>2022-02-07 13:12:01 +0100
committerKadir Cetinkaya <kadircet@google.com>2022-02-07 14:06:32 +0100
commitf59787084e09aeb787cb3be3103b2419ccd14163 (patch)
treebcc0f7b17b05a9082c6668dc7c4e1d521f514d4b /clang/unittests/Lex/LexerTest.cpp
parent2e0409a54542b48200d1f946c21dbac663ef30a9 (diff)
downloadllvm-f59787084e09aeb787cb3be3103b2419ccd14163.zip
llvm-f59787084e09aeb787cb3be3103b2419ccd14163.tar.gz
llvm-f59787084e09aeb787cb3be3103b2419ccd14163.tar.bz2
[clang][Lexer] Fix tests after ff77071a4d67
Diffstat (limited to 'clang/unittests/Lex/LexerTest.cpp')
-rw-r--r--clang/unittests/Lex/LexerTest.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/unittests/Lex/LexerTest.cpp b/clang/unittests/Lex/LexerTest.cpp
index df22e77..f534de1 100644
--- a/clang/unittests/Lex/LexerTest.cpp
+++ b/clang/unittests/Lex/LexerTest.cpp
@@ -639,6 +639,7 @@ TEST_F(LexerTest, RawAndNormalLexSameForLineComments) {
const llvm::StringLiteral Source = R"cpp(
// First line comment.
//* Second line comment which is ambigious.
+ ; // Have a non-comment token to make sure something is lexed.
)cpp";
LangOpts.LineComment = false;
auto Toks = Lex(Source);
@@ -650,6 +651,7 @@ TEST_F(LexerTest, RawAndNormalLexSameForLineComments) {
auto ToksView = llvm::makeArrayRef(Toks);
clang::Token T;
+ EXPECT_FALSE(ToksView.empty());
while (!L.LexFromRawLexer(T)) {
ASSERT_TRUE(!ToksView.empty());
EXPECT_EQ(T.getKind(), ToksView.front().getKind());