[PATCH] D134137: [clangd] Return earlier when snippet is empty

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 23 08:26:03 PDT 2022


sammccall added a comment.

It's not surprising that we often don't crash here, the "obvious" lowering of `S.front()` is `*S.data()` which is perfectly valid (will be 0 for an empty string).

One way to crash on this is to build with libstdc++'s debug iterators, which assert on this. Fedora seems to be building (some of) their packages in this mode, such that they crash but (sometimes?) do not print the assertion message. This was the cause in https://github.com/clangd/vscode-clangd/issues/400.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134137



More information about the cfe-commits mailing list