[PATCH] D99889: [AsmParser][ms][X86] Fix possible misbehaviour in parsing of special tokens at start of string.
Anirudh Prasad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 14 09:42:49 PDT 2021
anirudhp marked 3 inline comments as done.
anirudhp added inline comments.
================
Comment at: llvm/unittests/MC/SystemZ/SystemZAsmLexerTest.cpp:544-545
+}
+
+TEST_F(SystemZAsmLexerTest, CheckDefaultHashAtStartOfIdentifier) {
+ StringRef AsmStr = "##lj1?23";
----------------
anirudhp wrote:
> Jonathan.Crowther wrote:
> > Not sure what you're checking here that the `CheckStrictCommentString*` tests don't already check.
> The idea was to show that even under default circumstances, "#" is usually lexed as a default comment. But like you say its probably already covered in the CommentString tests. I'll look at it a bit deeply again, and update if needed.
Removed the test.
================
Comment at: llvm/unittests/MC/SystemZ/SystemZAsmLexerTest.cpp:557
+ lexAndCheckTokens(AsmStr, ExpectedTokens);
+}
} // end anonymous namespace
----------------
anirudhp wrote:
> Jonathan.Crowther wrote:
> > I think there should be a test for `$` at the start of an identifier for completeness. I don't see one in `SystemZAsmLexerTest.cpp` but you may know of one somewhere else.
> Hmm you're right. I want to say there was a reason I didn't include the test for the "$" but honestly, now I don't remember. I'll go back and add the tests and if there was a problem / I remember why I didn't add it initially, I'll update this thread.
Updated the test.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99889/new/
https://reviews.llvm.org/D99889
More information about the llvm-commits
mailing list