On Mac OS X, with Qt Creator 4.2.0, the clazy warnings don't show up in the "Issues" tab, nor in the "Compile output" tab. The only way to see clazy warnings is to call "make" from the command line.
Not sure if this should instead be filed in Qt Creator bug tracker, needs investigation first.
Can you compile this simple program: #include <QFileInfo> int main() { QFileInfo("foo").exists(); return 0; } and paste here the "Compile output tab" ?
Here it is: 12:26:50: Exécution des étapes pour le projet test... 12:26:50: Débute : "/Users/nkniebilher/Qt/5.6/clang_64/bin/qmake" /Users/nkniebilher/Documents/test/test.pro -spec macx-clang CONFIG+=debug CONFIG+=x86_64 CONFIG+=qml_debug Info: creating stash file /Users/nkniebilher/Documents/build-test-Desktop_Qt_5_6_2_clang_64bit-Debug/.qmake.stash 12:26:52: Le processus "/Users/nkniebilher/Qt/5.6/clang_64/bin/qmake" s'est terminé normalement. 12:26:52: Débute : "/usr/bin/make" qmake_all make: Nothing to be done for `qmake_all'. 12:26:52: Le processus "/usr/bin/make" s'est terminé normalement. 12:26:52: Débute : "/usr/bin/make" /usr/local/bin/clazy -c -pipe -stdlib=libc++ -g -Xclang -plugin-arg-clang-lazy -Xclang level0,level1 -std=gnu++11 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.7 -Wall -W -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_CORE_LIB -I../test -I. -I../../../Qt/5.6/clang_64/lib/QtCore.framework/Headers -I. -I../../../Qt/5.6/clang_64/mkspecs/macx-clang -F/Users/nkniebilher/Qt/5.6/clang_64/lib -o main.o ../test/main.cpp /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -headerpad_max_install_names -stdlib=libc++ -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.7 -Wl,-rpath,/Users/nkniebilher/Qt/5.6/clang_64/lib -o test main.o -F/Users/nkniebilher/Qt/5.6/clang_64/lib -framework QtCore -framework DiskArbitration -framework IOKit 12:27:02: Le processus "/usr/bin/make" s'est terminé normalement. 12:27:02: Temps écoulé : 00:12.
Can you printscreen QtCreator's dialog for your Kit settings and Compiler settings ?
Created attachment 104397 [details] Kit settings screenshot
Created attachment 104398 [details] Compiler settings screenshot
With "QMAKE_CXX = clazy" in the .pro
In fact it's "QMAKE_CXX = /usr/local/bin/clazy"
clazy calls clang I think when you run clazy through QtCreator it calls Apple clang, which doesn't support plugins, while on the command line it's using non-Apple clang. There might be some differences regarding PATH, and I think QtCreator adds the compiler from the Kit you're using to PATH. Can you try: QMAKE_CXX = <complete path to non-Apple clang> QMAKE_CXXFLAGS += -Xclang -load -Xclang ClangLazy.dylib -Xclang -add-plugin -Xclang clang-lazy
Yeah! It worked!! :D It also works with: QMAKE_CXX = export CLANGXX=/opt/local/bin/clang++; /usr/local/bin/clazy It was a difficult one to find! Do you know a way to add a clazy kit? This way, it would be possible to build with clazy without having to change the .pro file...
No, it doesn't seem possible. We would need a clazy mkspec for that.
Yeah I came to the same conclusion after trying some things. Anyway, thank you for your time!
For Qt 5.9 or 5.10 I'm hoping to have CONFIG += clazy option
That would be great! :D