Syntax highlighting is broken when using precompiled headers. Changing C++→Code Model→Ignore precompiled headers doesn't seem to change anything.
I've made and attached Minimal Working Example – simple CMake project – to reproduce the bug. To reproduce:
- open the project with QtCreator
- select a toolchain with gcc or clang
<Syntax highlighting works good at this point>
- build a project
<Syntax highlighting partially work, for some files is OK, for some is not>
- close QtCreator and run again with the same project
<Syntax highlighting is broken at this stage>
This bug could not be reproduced with PCH disabled (CMake's variable SAMPLE_USED_PRECOMPILED_HEADER set to OFF).