Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Analysis scripts

To invoke the Clang Static Analyzer, it is recommended to use the scan-build package implemented in Python. You can either use the scripts being part in the Clang repository (llvm/tools/clang/tools/scan-build-py/bin) or install them with pip install scan-build. Note that on make install LLVM copies an old Perl version of scan-build to /usr/local/bin which therefore might overwrite the Python version installed with pip. To run Clang-Tidy based on a compilation database, you can use See the Clang-Tidy documentation for further details.

Invoke analysis

Clang Static Analyzer:

  • As MPI wrapper compilers interfere with the scan-build script, it is recommended to invoke the analysis based on a compilation database generated by intercept-build (make|ninja|...). Note that databases generated by CMake can differ from those generated by intercept-build.

  • In order to produce a non-empty compilation database with intercept-build on macOS, system integrity protection needs to be disabled. See: Build EAR - README.

  • After the compilation database is created, analysis can be triggered with:
    analyze-build --enable-checker optin.mpi.MPI-Checker

Clang-Tidy: \
    -p=/path/to/compdb/folder \
    -clang-tidy-binary=/path/to/clang-tidy \
You can’t perform that action at this time.