~/talk

Pets, Cattle and Automatic Clang Operations with C++ Code

Talkat C++ on Sea 2024 · 2024-07-02..07-05· [c-and-cpp, developer-experience]
slides:none on file

Shows how to use Clang tooling to automate real refactors and searches using clang-query matchers, clang-transform/ClangTidy fixes, and libclang python bindings to script one-off generators. Demonstrates matching a buggy conditional_variable wait pattern and replacing pointer args with references across a codebase, and converting hundreds of span string literals into an enum to cut CPU and network cost. Requires compile_commands.json and yields diffs applied to files so the changes actually compile and run.

AI-written summary · about

  1. 0:00Introduction
  2. 3:17Codebase problems at scale
  3. 10:27Regex limits for code tasks
  4. 13:17How compilers parse code
  5. 16:09Clang tooling: matches & transforms
  6. 22:22Debugging matchers with Clang Query
  7. 25:10Fixing code standards with Clang Transform
  8. 36:18Generating code from patterns
  9. 46:06Automate or manual tools?
  10. 47:53Summary & Q&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.