[PATCH] D118471: [clang][Lexer] Make raw and normal lexer behave the same for line comments
Paul Robinson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 4 15:03:17 PST 2022
probinson added inline comments.
================
Comment at: clang/unittests/Lex/LexerTest.cpp:654
+ while (!L.LexFromRawLexer(T)) {
+ ASSERT_TRUE(!ToksView.empty());
+ EXPECT_EQ(T.getKind(), ToksView.front().getKind());
----------------
@kadircet @sammccall It turns out this while loop is zero-trip; the test assertions in the body are never executed. Replace it with `assert(false);` and the test doesn't crash.
That means `ToksView` is empty from the start. This is probably not what you wanted?
In other words, the test does not exercise the patch. This is pretty serious. It needs to be fixed or reverted.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118471/new/
https://reviews.llvm.org/D118471
More information about the cfe-commits
mailing list