Author: Kadir Cetinkaya
Date: 2022-02-07T14:06:32+01:00
New Revision: f59787084e09aeb787cb3be3103b2419ccd14163

URL: 
https://github.com/llvm/llvm-project/commit/f59787084e09aeb787cb3be3103b2419ccd14163
DIFF: 
https://github.com/llvm/llvm-project/commit/f59787084e09aeb787cb3be3103b2419ccd14163.diff

LOG: [clang][Lexer] Fix tests after ff77071a4d67

Added: 
    

Modified: 
    clang/unittests/Lex/LexerTest.cpp

Removed: 
    


################################################################################
diff  --git a/clang/unittests/Lex/LexerTest.cpp 
b/clang/unittests/Lex/LexerTest.cpp
index df22e775314a9..f534de1ca813a 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());


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to