Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-16432

Clang code model doesn’t work with libstdc++ 6.*

    XMLWordPrintable

Details

    Description

      qtcreator highlights odd errors coming from STL code (see screenshot of the plain CMake application). Code completion seems broken as well.

      It seems that system includes passed to clang have wrong order:

      ...
      clangbackend.stderr: ignoring nonexistent directory "../lib/clang/3.8.0/include"
      clangbackend.stderr: #include "..." search starts here:
      clangbackend.stderr: #include <...> search starts here:
      clangbackend.stderr:  /usr/lib/clang/3.8.0/include
      clangbackend.stderr:  /usr/share/qtcreator/cplusplus/wrappedQtHeaders
      clangbackend.stderr:  /usr/share/qtcreator/cplusplus/wrappedQtHeaders/QtCore
      clangbackend.stderr:  /usr/include
      clangbackend.stderr:  /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../include/c++/6.1.1
      clangbackend.stderr:  /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../include/c++/6.1.1/backward
      clangbackend.stderr:  /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../include/c++/6.1.1/x86_64-pc-linux-gnu
      clangbackend.stderr:  /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include
      clangbackend.stderr:  /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/include-fixed
      clangbackend.stderr:  /usr/local/include
      clangbackend.stderr:  /home/andrey/test
      clangbackend.stderr: End of search list.
      ...
      

      /usr/include should go after all of the /usr/include/c++/6.1.1/*. Apparently, include order makes a difference in the latest versions of libstdc++.

      The issue can be somehow related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70129

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            hunger Tobias Hunger
            4og Andrey Babanin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes