Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 4.1.0-beta1
-
None
-
LLVM/Clang 3.8.0
Description
The code
#include <future> int main() { }
can't be analyzed for a C++11 projects with a MSVC2013 Kit:
Running Clang Static Analyzer on C:\Users\nik\Documents\untitled62\untitled62.pro Analyzing "C:\Users\nik\Documents\untitled62\main.cpp". Failed to analyze "C:/Users/nik/Documents/untitled62/main.cpp": Clang Static Analyzer finished with exit code: 1. Command line: D:/dev/llvm/3.8/changingLibClang_install/bin/clang-cl.exe --analyze -o C:/Users/nik/AppData/Local/Temp/qtc-clangstaticanalyzer-Hp6Bbu/report-main.cpp-GUr160.plist -m32 /TP /EHsc "/D__MSVCRT__=" "/D__w64=" "/D__int64=long long" "/D__int32=long" "/D__int16=short" "/D__int8=char" "/D__ptr32=" "/D__ptr64=" "/D__COUNTER__=" "/D_CPPRTTI=" "/D_CPPUNWIND=" "/D_DEBUG=" "/D_DLL=" "/D__FUNCDNAME__= __FUNCDNAME__ " "/D__FUNCSIG__= __FUNCSIG__ " "/D__FUNCTION__= __FUNCTION__ " "/D_INTEGRAL_MAX_BITS=6" "/D_M_IX86=60" "/D_M_IX86_FP=" "/D_MSC_BUILD=" "/D_MSC_EXTENSIONS=" "/D_MSC_FULL_VER=18004062" "/D_MSC_VER=180" "/D_MT=" "/D_NATIVE_WCHAR_T_DEFINED=" "/D_WCHAR_T_DEFINED=" "/D_WIN32=" "/D__DATE__="\^""Jul 5 2016" "/D__TIME__="\^""13:57:57" "/D__TIMESTAMP__="\^""Tue Jul 5 13:57:57 2016" "/DUNICODE=1" "/DWIN32=1" "/DQT_QML_DEBUG=1" "/D_M_IX86_FP=2" /IC:/Users/nik/Documents/untitled62 /ID:/usr/qt-5.6.0-msvc2013_32/5.6/msvc2013/mkspecs/win32-msvc2013 /IC:/Users/nik/Documents/build-untitled62-Qt_5_6_0_msvc2013-Debug "/IC:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE" "/IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "/IC:\Program Files (x86)\Windows Kits\8.1\include\um" "/IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" "-fms-compatibility-version=18.00" C:\Users\nik\Documents\untitled62\main.cpp Process Error: 5 Output: In file included from C:\Users\nik\Documents\untitled62\main.cpp:1: In file included from C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\future:18: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\ppltasks.h(26,2) : error: ERROR: Visual Studio 2010 SP1 or later is required to build ppltasks #error ERROR: Visual Studio 2010 SP1 or later is required to build ppltasks ^ C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\ppltasks.h(85,38) : error: redefinition of 'make_exception_ptr' template<class _E> exception_ptr make_exception_ptr(_E _Except) ^ C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\exception(539,34) : note: previous definition is here template<class _E> exception_ptr make_exception_ptr(_E _Except) ^ In file included from C:\Users\nik\Documents\untitled62\main.cpp:1: C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\future(466,17) : error: no matching function for call to 'make_exception_ptr' _Exception = make_exception_ptr(_Anon()); ^~~~~~~~~~~~~~~~~~ C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\future(450,3) : note: in instantiation of member function 'std::_Associated_state<int>::_Set_exception_raw' requested here _Set_exception_raw(_Exc, &_Lock, _At_thread_exit); ^ C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\future(1042,17) : note: in instantiation of member function 'std::_Associated_state<int>::_Set_exception' requested here _Assoc_state->_Set_exception(_Exc, _Defer); ^ C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\future(1681,35) : note: in instantiation of member function 'std::_State_manager<int>::_Set_exception' requested here _MyPromise._Get_state_for_set()._Set_exception(_Exc, false); ^ C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\ppltasks.h(85,38) : note: candidate template ignored: substitution failure [with _E = std::_Associated_state<int>::_Anon] template<class _E> exception_ptr make_exception_ptr(_E _Except) ^ 3 errors generated.
The line C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\ppltasks.h(26,2) is:
#if _MSC_FULL_VER < 160040219 /*IFSTRIP=IGN*/
but the Clang Static Analyzer gets "/D_MSC_FULL_VER=18004062" from the project explorer.
Note that the define from the project explorer has 8 digits and it's compared with a 9-digit number in ppltasks.h.
Attachments
Issue Links
- is duplicated by
-
QTCREATORBUG-16526 Clang Static Analyzer fails when using MSVC2013
- Closed