Using Clang LibASTMatchers for Compliance in Codebases
summary
Uses Clang LibASTMatchers and libtooling to find concrete instances where alarms are instantiated, distinguishing string literals versus config-member expressions, and emits structured JSON output for postprocessing. Prototype compiles to ~300–400 MB in debug and ~30 MB in release, processes a file in ~2–3 seconds and runs parallel in CI to gate builds. Handles tricky cases with an explicit override for runtime-only factories and is authorable via clang-query into standalone matchers.
AI-written summary · about
chapters (9)
- 0:00Start
- 2:40Failing Compliance
- 8:49Device Architecture
- 12:29Manual Process
- 13:01Regex
- 15:23Clang Tooling
- 16:47What is Clang Lib Tooling
- 17:32Clang AST
- 42:37Wrapping up the tool
related talks
24mRefactoring Legacy Codebases with LibTooling
29mUsing the Clang developer tools
56mHow to Refactor Millions of Line of Code Without Alienating Colleagues
49mPets, Cattle and Automatic Clang Operations with C++ Code
01h 03mApplied Best Practices
48mTooling Intuition
01h 24mExtending clang-tidy in the Present and in the Future
40mCode Intelligence in Large C(++) Repositories
