5
Clang-Tidy Linter Framework
This chapter introduces Clang-Tidy, the clang-based linter framework that utilizes the Abstract Syntax Tree (AST) to identify anti-patterns in C/C++/Objective-C code. First, we’ll discuss Clang-Tidy’s capabilities, the types of checks it offers, and how to use them. After that, we will delve into the architecture of Clang-Tidy and explore how to create our own custom lint check. In this chapter, we’ll cover the following topics:
An overview of Clang-Tidy, including a brief description of the different checks provided by default
The internal design of Clang-Tidy
How to create a custom Clang-Tidy check