Qt Creator built in Clang Tidy and Clazy failed to analyze
-
Hello,
I am using Qt creator 4.9.0. I have configuired my Qt project using Desktop Qt 5.12.3 MinGW 64-bit kit. I am unable to analyze my project files using built in Clang Tidy and Clazy.
It gives following error: Failed to analyze "C:/Qt/Qt5.12.3/Examples/Qt-5.12.3/tutorials/alarms/main.cpp": Clang-Tidy and Clazy finished with exit code: 1.
Do i need to install any further plugins to use buit in clang tidy and clazy? Can someone please guide me.My Clang-Tidy and Clazy Application Output is:
Analyzing "C:\Qt\Qt5.12.3\Examples\Qt-5.12.3\tutorials\alarms\main.cpp".
Failed to analyze "C:/Qt/Qt5.12.3/Examples/Qt-5.12.3/tutorials/alarms/main.cpp": Clang-Tidy and Clazy finished with exit code: 1.
Command line: C:\Qt\Qt5.12.3\Tools\QtCreator\bin\clang\bin\clang.exe -serialize-diagnostics C:/Users/sarfraz/AppData/Local/Temp/QtCreator-ayRphO/clangtools-nWgiNT/report-main.cpp-iyhBCz -Wno-unknown-pragmas -Wno-unknown-warning-option -Wno-documentation-unknown-command -w -Xclang -add-plugin -Xclang clang-tidy -Xclang -plugin-arg-clang-tidy -Xclang "-checks=-,clang-analyzer-" -nostdinc -nostdinc++ -fno-keep-inline-dllexport -g -fexceptions -mthreads -fsyntax-only -m64 "--target=x86_64-w64-mingw32" -x c++ "-std=gnu++14" -DUNICODE -D_UNICODE -DWIN32 -DMINGW_HAS_SECURE_API -DQT_QML_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I C:\Qt\Qt5.12.3\Tools\QtCreator\share\qtcreator\cplusplus\wrappedQtHeaders -I C:\Qt\Qt5.12.3\Tools\QtCreator\share\qtcreator\cplusplus\wrappedQtHeaders\QtCore -I C:\Qt\Qt5.12.3\Examples\Qt-5.12.3\tutorials\alarms -I C:\Qt\Qt5.12.3\5.12.3\mingw73_64\include -I C:\Qt\Qt5.12.3\5.12.3\mingw73_64\include\QtQuick -I C:\Qt\Qt5.12.3\5.12.3\mingw73_64\include\QtGui -I C:\Qt\Qt5.12.3\5.12.3\mingw73_64\include\QtANGLE -I C:\Qt\Qt5.12.3\5.12.3\mingw73_64\include\QtQml -I C:\Qt\Qt5.12.3\5.12.3\mingw73_64\include\QtNetwork -I C:\Qt\Qt5.12.3\5.12.3\mingw73_64\include\QtCore -I C:\Qt\Qt5.12.3\Examples\Qt-5.12.3\tutorials\build-alarms-Desktop_Qt_5_12_3_MinGW_64_bit-Debug\debug -I C:\VulkanSDK\1.0.51.0\include -I C:\Qt\Qt5.12.3\Examples\Qt-5.12.3\tutorials\build-alarms-Desktop_Qt_5_12_3_MinGW_64_bit-Debug -I C:\Qt\Qt5.12.3\5.12.3\mingw73_64\mkspecs\win32-g++ -isystem C:\Qt\Qt5.12.3\Tools\mingw730_64\lib\gcc\x86_64-w64-mingw32\7.3.0\include\c++ -isystem C:\Qt\Qt5.12.3\Tools\mingw730_64\lib\gcc\x86_64-w64-mingw32\7.3.0\include\c++\x86_64-w64-mingw32 -isystem C:\Qt\Qt5.12.3\Tools\mingw730_64\lib\gcc\x86_64-w64-mingw32\7.3.0\include\c++\backward -isystem C:\Qt\Qt5.12.3\Tools\QtCreator\bin\clang\lib\clang\7.0.0\include -isystem C:\Qt\Qt5.12.3\Tools\mingw730_64\lib\gcc\x86_64-w64-mingw32\7.3.0\include -isystem C:\Qt\Qt5.12.3\Tools\mingw730_64\lib\gcc\x86_64-w64-mingw32\7.3.0\include-fixed -isystem C:\Qt\Qt5.12.3\Tools\mingw730_64\x86_64-w64-mingw32\include C:\Qt\Qt5.12.3\Examples\Qt-5.12.3\tutorials\alarms\main.cpp
Process Error: 5
Output:
clang.exe: error: unknown argument: '-fno-keep-inline-dllexport'
15:43:23: Clang-Tidy and Clazy finished: Processed 0 files successfully, 1 failed. -
@Has478 said in Qt Creator built in Clang Tidy and Clazy failed to analyze:
clang.exe: error: unknown argument: '-fno-keep-inline-dllexport'
CLang apparently does not know this argument. From where does it come?
-
@Has478 said in Qt Creator built in Clang Tidy and Clazy failed to analyze:
-fno-keep-inline-dllexport'
I've seen this before https://bugreports.qt.io/browse/QTCREATORBUG-22452 - it wouldn't appear you are on the latest Creator. That may be enough to fix this one for you.