[Mlir-commits] [mlir] [mlir-lsp] Add DiagnosticTag from LSP spec (PR #91396)
Walter Erquinigo
llvmlistbot at llvm.org
Tue May 7 14:00:03 PDT 2024
================
@@ -646,6 +646,20 @@ llvm::json::Value mlir::lsp::toJSON(const DiagnosticRelatedInformation &info) {
// Diagnostic
//===----------------------------------------------------------------------===//
+llvm::json::Value mlir::lsp::toJSON(DiagnosticTag tag) {
+ return static_cast<int>(tag);
+}
+
+bool mlir::lsp::fromJSON(const llvm::json::Value &value, DiagnosticTag &result,
+ llvm::json::Path path) {
+ if (auto i = value.getAsInteger()) {
----------------
walter-erquinigo wrote:
don't use auto, just spell out the type
https://github.com/llvm/llvm-project/pull/91396
More information about the Mlir-commits
mailing list