[PATCH] D95229: [clangd] Treat optional field type mismatches as soft failures

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 22 06:28:11 PST 2021


kadircet created this revision.
kadircet added a reviewer: sammccall.
Herald added subscribers: usaxena95, arphaman.
kadircet requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang.

Clangd currently throws away any protocol messages whenever an optional
field has an unexpected type. This patch changes the behaviour to treat such
fields as missing.

This enables clangd to be more tolerant against small violations to the LSP
spec.

Fixes https://github.com/clangd/vscode-clangd/issues/134


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95229

Files:
  clang-tools-extra/clangd/Protocol.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95229.318509.patch
Type: text/x-patch
Size: 4255 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210122/d10b3891/attachment-0001.bin>


More information about the cfe-commits mailing list