Clang Tools

Detect problems in C, C++, and Objective-C programs with Clang-Tidy and Clazy.

To configure Clang diagnostics globally for Clang tools:

  1. Select Preferences > Analyzer > Clang Tools.

    {Clang Tools preferences}

  2. In the Clang-Tidy and Clazy-Standalone fields, set the paths to the executables to use.
  3. The Diagnostic configuration field shows the checks to perform. Click the value of the field to open the Diagnostic Configurations dialog, where you can select and edit the checks to perform.

    To perform checks from a Clang-Tidy configuration file instead, select Prefer .clang-tidy file, if present.

  4. To build the project before running the Clang tools, select the Build the project before analysis check box. The Clang tools do not require that you build the project before analysis, but they might display misleading warnings about files missing that are generated during the build. For big projects, not building the project might save some time.
  5. To disable automatic analysis of open documents, clear the Analyze open files check box.
  6. In the Parallel jobs field, select the number of jobs to run in parallel to make the analysis faster on multi-core processors.

See also Configure Clang diagnostics, Analyze code with Clang-Tidy and Clazy, and Specify Clang tools settings.