Open Thalley opened 6 months ago
I have the same issue on clangd 18.1.3. I am using -std=c17
and clangd is suggesting #include <cstdio>
for exit(1)
Just to add to that; I also see a lot more C++ header being suggested for C than just cerrno>
I am observing similar behavior with -std=c11 in eglot in gnu emacs using clangd on Windows when attempting to use the INT_MIN
macro, <climits>
is being suggested.
clangd version 18.1.3 (https://github.com/llvm/llvm-project c13b7485b87909fcf739f62cfa382b55407433c0) Features: windows+grpc Platform: x86_64-pc-windows-msvc
When compiling
.c
files with-std=c99
the Include Cleaner will suggest to include<cerrno>
instead of<errno.h>
which it shouldn't.<cerrno>
is arguably only the correct choice for C++ programs.Logs N/A
System information
Editor/LSP plugin: https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd
Operating system: Arch Linux