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

Tom Praschan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 23 08:38:29 PDT 2022


tom-anders added a comment.

In D134137#3877726 <https://reviews.llvm.org/D134137#3877726>, @sammccall wrote:

> 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.

Interesting, FYI I was able to reproduce this on Arch Linux.


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