Using Clang Static Analyzer

Qt Creator integrates the Clang Static Analyzer for finding problems in C, C++, and Objective-C programs (commercial only).

The Clang Static Analyzer runs with all the default checkers enabled. For more information about the checkers, see Available Checkers.

To suppress diagnostics, select Suppress This Diagnostic in the context menu. To view the suppression list for a project and to remove diagnostics from it, select Clang Static Analyzer Settings in the Projects mode.

Setting Up Clang Static Analyzer

You must have Clang installed to use the Clang Static Analyzer. On Windows, Clang version 3.6, or later, is required to use the MSVC tool chain.

To set up the Clang Static Analyzer, select Tools > Options > Analyzer > Clang Static Analyzer and check that the path to the Clang executable is set correctly in the Clang executable field.

Running Clang Static Analyzer

To run the Clang Static Analyzer to analyze an open project, select Analyze > Clang Static Analyzer on the menu bar. The Clang Static Analyzer starts automatically.

However, if you select Analyze in the mode selector to open the Analyze mode and then select Clang Static Analyzer, you must start the Clang Static Analyzer by selecting the (Start) button.

© 2015 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.