I'm having some trouble setting up clangd visual studio extension to support C23.
I use the following .clangd
file
CompileFlags:
Add: ["--std=c2x"]
Compiler: gcc
In my root folder:
.clangd
src
main.c
I can see from the extension logs that gcc correctly use the --std=c2x
flag, but the following little code:
int main(int argc, char **argv) {
int *a = nullptr;
}
Raise the following error on nullptr
: Use of undeclared identifier 'nullptr'clang(undeclared_var_use)
.
My clangd version:
$ clangd --version
clangd version 15.0.7
Features: linux
Platform: x86_64-pc-linux-gnu