Nathan Ridge
Nathan Ridge
> I've also encountered the aforementioned bug, where I talked about it [here (with backtrace logs)](https://github.com/erigontech/silkworm/issues/2408#issuecomment-2407201912) but on `Homebrew clangd version 19.1.1`. I'm a little confused about this 19.x release...
A 19.1.2 release is now up at https://github.com/clangd/clangd/releases/tag/19.1.2.
> A 19.1.2 release is now up at https://github.com/clangd/clangd/releases/tag/19.1.2. I just realized this was still marked as "pre-release"; unchecked that now. Are we ready to mark this as "latest"?
> Are we ready to mark this as "latest"? Forgot to circle back to this and tick the "latest" checkbox. Done now.
As mentioned in the discussion, this seems to be an incorrect diagnostic arising from clangd's preamble optimization. Since the `#undef` is part of the file's preamble, it seems not to...
Somewhat similar to #1167 but seems more impactful as it can cause false positive error diagnostics, not just warnings.
See also https://github.com/llvm/llvm-project/issues/97759 for a reverse example, with a `-U` flag in the compile commands and a `#define` in the preamble.
[This](https://searchfox.org/llvm/rev/117b53ae38428ca66eaa886fb432e6f09db88fe4/clang-tools-extra/clangd/GlobalCompilationDatabase.cpp#259) is where response files are currently expanded. It's the very first processing step applied to the raw compile command read from `compile_commands.json`. And [this](https://searchfox.org/llvm/rev/117b53ae38428ca66eaa886fb432e6f09db88fe4/clang-tools-extra/clangd/CompileCommands.cpp#298-299) is where edits from the...
> 2. Possible interactions with command interpolation. (That refers to the process by which a compile command for one file which is present in the CDB, is adapted to be...
A slightly simpler repro which does not require deleting two non-adjacent lines at once (which not all clients can do) is to start with: ```c++ /* */ #define bar 1...