Similar issues have been reported for other project types. This one is specific to the Compilation Database Project Manager.
- Enable the experimental Compilation Database Project Manager plugin
- Create a minimal C++ project - I created a qmake-based one and I created it outside Qt Creator
- Use e.g. compiledb or bear to create compile_commands.json under the project
- Open the project through compile_commands.json in Qt Creator
- Open the main C++ source
An infobar appears in the editor, saying:
Warning: The code model could not parse an included file, which might lead to incorrect code completion and highlighting, for example:
qglobal.h:1092:4: error: "You must build your code with position independent code if Qt was built with -reduce-relocations. " "Compile your code with -fPIC (-fPIE is not enough)."