[all-commits] [llvm/llvm-project] 61d5fa: [WebAssembly] Fix error location for parsed symbol...

Alex Bradbury via All-commits all-commits at lists.llvm.org
Wed Mar 23 01:53:43 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 61d5fa6b62bbfd788d290537dab073beefb8298b
      https://github.com/llvm/llvm-project/commit/61d5fa6b62bbfd788d290537dab073beefb8298b
  Author: Alex Bradbury <asb at igalia.com>
  Date:   2022-03-23 (Wed, 23 Mar 2022)

  Changed paths:
    M llvm/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
    M llvm/test/MC/WebAssembly/type-checker-errors.s

  Log Message:
  -----------
  [WebAssembly] Fix error location for parsed symbol/label operands

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, I've opted to
make it a child patch in order to ensure the change has some test
coverage.

Differential Revision: https://reviews.llvm.org/D122128




More information about the All-commits mailing list