2020 LLVM Developers’ Meeting: “Using Clang-tidy for Customized Checkers and Large Scale Source...”
https://llvm.org/devmtg/2020-09/
—
Using Clang-tidy for Customized Checkers and Large Scale Source Tree Refactoring - Vince Bridgers
Slides: https://llvm.org/devmtg/2020-09/slides/Clang-tidy_for_Customized_Checkers_and_Large_Scale.pdf
—
In this tutorial, I'll present some motivating examples for writing custom clang-tidy checkers. I'll present examples that cover usage of PPCallbacks and AST Matchers, with coverage of how to use clang-query to discover appropriate matchers for the problems covered in the tutorial. I'll then move on to an example large scale refactoring example, and present the details using a CMake based build system of how to create a compile_commands.json file, and drive a large scale refactoring using available tools.
The audience is assumed to be programmers interested in creating custom checkers or refactoring tools for mid to large scale source projects. Programmers of any experience level that are new to clang-tidy (not necessarily LLVM/Clang), or need a review of that material, would benefit from this tutorial.
—