Mechanical C++ Refactoring in the Present and in the Future
summary
Mechanical refactoring uses clang-tidy checks and custom clang AST matchers discovered with clang-query to automate large-scale C++ edits, hitting roughly 80–90% of cases before manual fixes for templates or macros. A JavaScript-based GUI (qapla) runs matchers, shows AST nodes and source locations, batches replacements into a replacement database, and applies them in parallel; it compiles against clang’s virtual file system so iteration finds and fixes failures. Run time matches a full compile unless you use PCH, unity builds or a build-distributor like icecream.
AI-written summary · about
chapters (8)
- 0:00Start
- 13:05make your code awesome by renaming all of your functions
- 15:10creating a binding for every function declaration in the code
- 20:44specify the type as a string
- 28:10creating account id check
- 41:30reuse fragments of ast matchers
- 47:37create insertion at the insertion point
- 50:12run your tool on particular parts of your source code
related talks
01h 03mHow to Build Your First C++ Automated Refactoring Tool
56mHow to Refactor Millions of Line of Code Without Alienating Colleagues
01h 01mHow to Refactor Millions of Line of Code Without Alienating your Colleagues
24mRefactoring Legacy Codebases with LibTooling
01h 24mExtending clang-tidy in the Present and in the Future
49mPets, Cattle and Automatic Clang Operations with C++ Code
01h 05mImprove your code with Clang Tooling
01h 01mTools from the C++ Ecosystem to save a leg
