Introduction
clang-tidy is a clang-based C++ โlinterโ tool. Its purpose is to provide an extensible framework for diagnosing and fixing typical programming errors, like style violations, interface misuse, or bugs that can be deduced via static analysis. clang-tidy is modular and provides a convenient interface for writing new checks.
HighTec does not provide clang-tidy tool with the purchased toolchain. It is needed to be downloaded and installed manually. The purpose of this guide is to show how to install the tool in Windows and Linux, and to provide information of using with the latest LLVM release for x86 host. Also practical example codes and sample commands are included in order to demonstrate the right way of usage.
At the creation time of this guide the latest LLVM release version was v19.1.6 so this version will be referred in the rest of the documentation.
Limitations
-
The guide does not contain the instructions of checking a complex project, only describes the steps to analyze a simple one.
-
The document does not cover all the features of clang-tidy tool, for that purpose, please read https://clang.llvm.org/extra/clang-tidy/.
-
It is possible to implement your custom tool and integrate it into the build environment. More information can be found in these websites.