Using make clean && bear -- make will cause a correct compile_commands.json to be emitted. This allows using completion tools like clangd.
make clean && bear -- make