-
Notifications
You must be signed in to change notification settings - Fork 15.4k
Closed as not planned
Closed as not planned
Copy link
Labels
clangClang issues not falling into any other categoryClang issues not falling into any other categoryquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!
Description
Running clang with -MJ on my project, which uses a unity build file, produces the following (truncated for viewing ease) compile_commands.json.
{ "directory": "....", "file": "...", "output": "...", "arguments": [........] },
Note the trailing comma at the very end there, which breaks most json parsers, like nlohmann/json.
Though in general, the schema for this json is that there should be an array of these command objects, so really this should probably look like
[ { "directory": "....", ......, "arguments": [...] } ]
https://clang.llvm.org/docs/JSONCompilationDatabase.html
"A compilation database is a JSON file, which consist of an array of “command objects”"
Metadata
Metadata
Assignees
Labels
clangClang issues not falling into any other categoryClang issues not falling into any other categoryquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!A question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!