SourceMgr generally uses 1-based locations, whereas the LSP is zero based.
This commit corrects this conversion and also enhances the conversion from SMLoc
to SMRange to support string tokens.
Depends on D124583
Paths
| Differential D124584
[mlir:LSP] Improve conversion between SourceMgr and LSP locations ClosedPublic Authored by rriddle on Apr 27 2022, 5:34 PM.
Details Summary SourceMgr generally uses 1-based locations, whereas the LSP is zero based. Depends on D124583
Diff Detail
Event Timelinerriddle added a child revision: D124585: [mlir:PDLL] Fix error handling of eof within a string literal.Apr 27 2022, 5:35 PM This revision is now accepted and ready to land.Apr 28 2022, 5:54 AM This revision was landed with ongoing or failed builds.Apr 28 2022, 12:58 PM Closed by commit rG32bf1f1d57e7: [mlir:LSP] Improve conversion between SourceMgr and LSP locations (authored by rriddle). · Explain Why This revision was automatically updated to reflect the committed changes. rriddle marked an inline comment as done.
Revision Contents
Diff 425887 mlir/lib/Parser/AsmParserState.cpp
mlir/lib/Tools/lsp-server-support/Protocol.h
mlir/lib/Tools/mlir-lsp-server/MLIRServer.cpp
mlir/lib/Tools/mlir-pdll-lsp-server/PDLLServer.cpp
mlir/test/mlir-lsp-server/diagnostics.test
mlir/test/mlir-pdll-lsp-server/definition-split-file.test
|
Function comment?