[PATCH] D122128: [WebAssembly] Fix error location for parsed symbol/label operands
Alex Bradbury via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 21 05:03:01 PDT 2022
asb created this revision.
asb added reviewers: pmatos, tlively, aheejin.
Herald added subscribers: ecnelises, sameer.abuasal, sunfish, hiraditya, jgravelle-google, sbc100, dschuff.
Herald added a project: All.
asb requested review of this revision.
Herald added a project: LLVM.
The previous code didn't take account for the fact that parseExpression my lex additional tokens - because of this, it's necessary to record the location of the current token ahead of the call. This patch additionally makes use of the fact parseExpression will set its End parameter to the end of the expression.
Although this fix could be added independently of D122127 <https://reviews.llvm.org/D122127>, I've opted to make it a child patch in order to ensure the change has some test coverage.
https://reviews.llvm.org/D122128
Files:
llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
llvm/test/MC/WebAssembly/type-checker-errors.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122128.416899.patch
Type: text/x-patch
Size: 3776 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220321/af03c41e/attachment.bin>
More information about the llvm-commits
mailing list