Problems with Open-Source Downloads read https://www.qt.io/blog/problem-with-open-source-downloads and https://forum.qt.io/post/638946

Adding flag to clang for detecting problems in code



  • I want to add a flag to tell clang to complain about local variable shadowing. I thought clang also responded to flags set on the compiler such as:

    QMAKE_CXXFLAGS += -Wshadow-all
    

    I want the in editor warnings to complain about variable shadowing. I understand there is a version of clang that provides these kinds of warnings in the editor. I looked at the Options in Qt Creator under the Analyzer->Clang Tools tab. But I am unsure if this is the place to add flags like this.


Log in to reply