How to Refactor Millions of Line of Code Without Alienating Colleagues
summary
Shows how to use Clang-Tidy extension API to write custom AST matchers and automated fix‑its, with concrete wins and limits: removing a dead parameter across 40,000 files with generated diffs, converting int return codes to an enum class via an incremental multi-step refactoring, and automating CI runs. Explains real pitfalls—macros, lambdas, overloaded &&, header conflicts—and practical fixes: emit XML replacements, deduplicate patches, run rules on diffs, and prefer staged, reviewable change sets rather than one massive commit.
AI-written summary · about
related talks
01h 03mHow to Build Your First C++ Automated Refactoring Tool
24mRefactoring Legacy Codebases with LibTooling
01h 24mExtending clang-tidy in the Present and in the Future
59mMechanical C++ Refactoring in the Present and in the Future
49mPets, Cattle and Automatic Clang Operations with C++ Code
01h 05mImprove your code with Clang Tooling
55mSo, you inherited a large code base...
01h 01mBetter Tools in Your Clang Toolbox
