Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
Qt Creator 4.0.2
-
None
-
Arch Linux, GCC 6.1.1, Clang 3.8
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