What value do i have to use for the file - attribute in a compile_commands.json for clang?
Here it says: https://clang.llvm.org/docs/JSONCompilationDatabase.html
file: The main translation unit source processed by this compilation step. This is used by tools as the key into the compilation database. There can be multiple command objects for the same file, for example if the same source file is compiled with different configurations.
[
{ "directory": "/home/user/llvm/build",
"arguments": ["/usr/bin/clang++", "-Irelative", "-DSOMEDEF=With spaces, quotes and \\-es.", "-c", "-o", "file.o", "file.cc"],
"file": "file.cc" },
]
My Files (.c) are in the same Folder as my .compile_commands.json. (Basically everything is just in one folder).
Yet if i do
"file": "myfile.c"
it wont work, and clangd uses the Fallback.
But if i use the absolute path it works for some reason.
So what is the correct non-absoulte path value i need to use please? (i am on windows)