Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
Qt Creator 4.6.0
-
None
-
Windows 7 x64, MSVC14, cmake 3.10
Description
I'm working on windows with MSVC and have a project using opencv, which somewhere deep inside uses the emmintrin.h.
The Clang code model reports in the top bar, where the current filename etc is displayed, a warning, that an included file could not be parsed, which might lead to slow or incorrect code completion etc. (which is what I'm trying to solve, as it is extremly slow) The culprit is emmintrin.h which resides here: C:\Qt\Tools\QtCreator\bin\clang\lib\clang\5.0.1\include
I've created a simple example which includes just it:
#include <emmintrin.h> int main() { return 0; }
The warning reports the following:
emmintrin.h:2261:19: error: use of undeclared identifier '__builtin_ia32_pavgb128'
main.cpp:2:10: note: in file included from C:\Users\iweber\Documents\GitRepos\csa\main.cpp:2:
In fact there are two intrinsic functions __builtin_ia32_pavgb128() and
__builtin_ia32_pavgw128() which produce this
error: use of undeclared identifier '__builtin_ia32_pavgb128
While I'm fighting with a few other problems with the clang code model and static analyzer I found this QTCREATORBUG-19592 and the provided workaround helped me with one other issue (which I also wrote about here QTCREATORBUG-20198). So I had a look in the clang include directory of the separate clang 7 (I went with the latest llvm) installation and the emmintrin.h there does not use the two mentioned functions and has some implementation changes. To check that I copied the clang 7 include folder to QtCreators clang temporarily and lo and behold the issues with emmintrin.h are gone.
(new warnings/errors are popping up now, which again hint me to another problem I'm trying to track down: even though I request c++17 in my cmakelists.txt, I get an error in the variant header that it is a c17 feature. Which reminds me of the clang static analyzer using c+14 regardless of my requested version. Question: should I open up another ticket for that?)
Attachments
Issue Links
- relates to
-
QTCREATORBUG-20903 Clang code model "definition of builtin function" error when including GCC intrisics headers
- Closed