Failed to load compilation database from C:/Programming/Git/cpp-is-magic/compile_commands.json: Expected array.
If I add brackets [] in my compile_commands.json it works perfectly.
How can I correct this problem?
Does this bug come from clang, clangd or the VS Code extension?
I'm using clang 18.1.6 and clangd extension v0.1.28 under Windows. When I run this command:
It generates the following
compile_commands.json
:and
clangd
underVS Code
return this error:If I add brackets
[]
in mycompile_commands.json
it works perfectly. How can I correct this problem? Does this bug come fromclang
,clangd
or theVS Code
extension?