aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Lex/LexerTest.cpp
diff options
context:
space:
mode:
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());