Create new tool(s) for normalizing compilation databases
CodeChecker currently uses the following 2 mechanisms to preprocess the compilation databases (compile_commands.json):
- Filtering and extending compilation flags in order to make the build command analysis-friendly.
- Unique-ing the compilation database, so translation unit is only analyzed once, even if there are multiple binaries which use its object code (appears a linker input multiple times).
The steps which handle these are mostly used as part of the analysis process, however, the need may arise to create a "normalized" compilation database as a separate step.
IMHO 2 new tools should be created (accessible as CodeChecker subcommands, and CodeChecker libraries as well) to handle these task (with an optional wrapper command which runs these two in sequence).
On-the-fly analysis feature would also require this "normalized" compilation database, as parsing the original compile_commands.json and using the dumped AST files leads to some amount of difference in AST used for analysis. Analysis results may differ, which is undesirable.