Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 4.2.0-beta1
-
None
Description
- Set up a Kit with a clang exectuable as toolchain
- Set up a clang executable for the ClangStaticAnalyzer that is different from step 1
- Open ${QTCREATOR_SOURCE}/src/plugins/clangstaticanalyzer/unit-tests/stdc+11-includes/stdc+11-includes.pro with the Kit from the step before
- Run the analyzer
The very first error is:
In file included from /home/nik/dev/creator/creator-4.2/src/plugins/clangstaticanalyzer/unit-tests/stdc++11-includes/main.cpp:3: In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/algorithm:62: In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/bits/stl_algo.h:66: In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/random:50: In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/x86_64-linux-gnu/c++/5.4.0/bits/opt_random.h:33: In file included from /usr/lib/llvm-3.8/bin/../lib/clang/3.8.0/include/x86intrin.h:29: In file included from /usr/lib/llvm-3.8/bin/../lib/clang/3.8.0/include/immintrin.h:29: /usr/lib/llvm-3.8/bin/../lib/clang/3.8.0/include/xmmintrin.h:646:3: error: use of undeclared identifier '__builtin_ia32_storeups' __builtin_ia32_storeups(__p, __a); ^
This is due to the following include paths that are used:
#include "..." search starts here: #include <...> search starts here: /home/nik/work/csaTestSessionProjects/stdc++11-includes /home/nik/work/csaTestSessionProjects/build-stdc++11-includes-Qt_5_6_1_gcc_64_with_Clang_x86_64bit_in_usr_bin-Debug /home/nik/usr/qt-5.6.1-1/5.6/gcc_64/mkspecs/linux-clang /usr/lib/llvm-3.8/bin/../lib/clang/3.8.0/include /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0 /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/x86_64-linux-gnu/c++/5.4.0 /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/backward /usr/local/include /home/nik/dev/llvm/3.9/installs/gcc54_rtti/bin/../lib/clang/3.9.1/include /usr/include/x86_64-linux-gnu /usr/include End of search list.
Note that there are two include paths to the intrinsics - path /usr/lib/llvm-3.8/bin/../lib/clang/3.8.0/include and /home/nik/dev/llvm/3.9/installs/gcc54_rtti/bin/../lib/clang/3.9.1/include.
The first one comes from the toolchain, the second one from the clang static analyzer executable. The clang static analyzer executable is confronted with the instrinsics include path to another clang version.
There should be only one include path to instrinsics. It should be the one from the clang static analyzer executable.
Attachments
For Gerrit Dashboard: QTCREATORBUG-17102 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
173655,2 | ClangStaticAnalyzer: Fix path for intrinsics for clang toolchains | 4.2 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |