[Mlir-commits] [mlir] [mlir] Do not set lastToken in AsmParser's resetToken function and add a unit test for AsmParsers's locations (PR #105529)
River Riddle
llvmlistbot at llvm.org
Tue Sep 3 16:21:11 PDT 2024
River707 wrote:
With the current usage of resetToken, this change is fine, but it's a little spooky that there is an implicit contract between the last token and resetToken, that could be easily broken if you aren't careful (not that the current behavior is really correct either). This is relying on the various of resetToken to cancel out, i.e. the resetTokens used for parsing attributes/types to technically be correct (because it resets first to the start of the attribute/type, and then to the end). This behavior can be fine, but we should ensure that the connection to lastToken is documented in the doc for resetToken.
https://github.com/llvm/llvm-project/pull/105529
More information about the Mlir-commits
mailing list