~/talk

How to Build Your First C++ Automated Refactoring Tool

Talkat CppCon 2023 · on Wednesday, 2023-10-04· at 16:45· Adams, 6700 North Gaylord Rockies Boulevard· [developer-experience]
links:none on file
slides:none on file

Shows how to write a real clang-based refactoring: building a clang-tidy check, composing AST matchers, and emitting fix‑its that actually edit code. Covers the matcher APIs, traversal caveats, and applying fixes via compilation databases and ninja builds. Mentions tools that migrated over half a million call sites and removed 600+ APIs and a live example that adds const auto& to stop copies, with tests and build-time integration — practical, concrete, and demonstrably working.

AI-written summary · about

  1. 0:00Introduction
  2. 3:10Why build refactoring tools
  3. 9:22Clang-tidy and use cases
  4. 15:57Clang AST for refactoring
  5. 22:14Building AST matchers
  6. 32:00First clang-tidy check
  7. 39:58Live demo of check
  8. 43:28Advanced tooling examples
  9. 51:22Designing checks
  10. 55:13Upstreaming checks
  11. 1:01:30Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.