[PATCH] D67720: [clangd] Add semantic selection to ClangdLSPServer.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 19 01:14:51 PDT 2019


ilya-biryukov added inline comments.


================
Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:1131
+    Callback<std::vector<SelectionRange>> Reply) {
+  if (Params.positions.size() != 1) {
+    elog("{0} positions provided to SelectionRange. Supports exactly one "
----------------
hokein wrote:
> maybe add an `assert(!Params.positions.empty())`. I think we should not run into this case.
But `Params` comes to clangd over LSP, right?
That means `assert` can fire in case of bad inputs over LSP to clangd.
Bad inputs over LSP should never crash clangd.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67720/new/

https://reviews.llvm.org/D67720





More information about the cfe-commits mailing list