This allows for diagnostics emitted during parsing/verification to be surfaced to the user by the language client, as opposed to just being emitted to the logs like they are now.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Looks good in general thanks
| mlir/include/mlir/Parser/AsmParserState.h | ||
|---|---|---|
| 88 | When would one do this vs just creating a new instance? (I'm assuming that is effectively what this is doing, keeping a reference constant but hollowing out - which a unique_ptr to parser state could also do) | |
| mlir/lib/Tools/mlir-lsp-server/MLIRServer.cpp | ||
| 197 | Not: s/lsp/LSP/ in comment text | |
| 204 | It's not just conceptually :-) | |
| 218 | ||
| 221 | Could you add comment explaining why a warning is an error when converted? | |
| mlir/lib/Tools/mlir-lsp-server/lsp/Protocol.h | ||
| 416 | Not: newline in between | |
| 471 | Same nit | |
update
| mlir/include/mlir/Parser/AsmParserState.h | ||
|---|---|---|
| 88 | Switched to using a r-val operator=, which is what I originally wanted but couldn't get to work yesterday for some reason. | |
| mlir/lib/Tools/mlir-lsp-server/MLIRServer.cpp | ||
| 221 | Oops, thanks for the catch. | |
| mlir/lib/Tools/mlir-lsp-server/lsp/Protocol.h | ||
| 416 | This follows the style of the rest of the file, will fix the whole thing in a followup if that's okay. | |
| 471 | Same as above. | |
When would one do this vs just creating a new instance? (I'm assuming that is effectively what this is doing, keeping a reference constant but hollowing out - which a unique_ptr to parser state could also do)