Uploaded image for project: 'Qt Creator'
  1. Qt Creator

Clang Code Model/Autocomplete not working with GCC precompiled headers (cotire)



    • Type: Bug
    • Status: Open
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: Qt Creator 4.9.2
    • Fix Version/s: Qt Creator 4.11.0-beta1
    • Component/s: C/C++/Obj-C++ Support
    • Labels:
    • Environment:
      Windows 7 and Windows 10, MinGW 7.3.0 64bit, Cmake and cotire
    • Platform/s:
    • Commits:
      17270366f364e35d1fb98c7e6ce207387874b0cf (qt-creator/qt-creator/4.11) 8ee22dd597ea67886f2fd605be3a4c17f551c5ae (qt-creator/tqtc-qt-creator/4.11)


      Qt Creators Clang Code Model, autocompletion and Outline are working as long as precompiled headers have not been build. After build those functions are not working for all files that are newly opened in the text editor.

      The Qt Creator Option C++ > Code Model > "Ignore precompiled headers" does not have any effect on this behavior.

      See the minimal sample project attached to reproduce:

      1) Import the project into Qt Creator

      2) Do not open any files in the code text editor!

      3) Build the project (and thus the precompiled headers)

      4) Open testclass.cpp in the code text editor

      5) Autocomplete, Outline and Clang Code Model are not working

      6) Close testclass.cpp code editor

      7) Clean build project (thus deleting precompiled headers)

      6) Open testclass.cpp > Autocomplete and Clang Code Model are working again





        1. 2020-04-07 at 15-46-23.mp4
          7.83 MB
          Stefan Bn
        2. Configure_PCHTest.PNG
          32 kB
          Stefan Bn
        3. PCHeadersProblem.zip
          31 kB
          Stefan Bn
        4. record_000007.avi
          5.33 MB
          Stefan Bn
        5. vokoscreenNG-2020-04-07_12-29-12.mp4
          5.75 MB
          Cristian Adam
        For Gerrit Dashboard: QTCREATORBUG-22888
        # Subject Branch Project Status CR V



            • Assignee:
              cadam Cristian Adam
              _rayman_ Stefan Bn
            • Votes:
              0 Vote for this issue
              6 Start watching this issue


              • Created:

                Gerrit Reviews

                There is 1 open Gerrit change