~/talk

Building on clang-tidy to Move From printf-style to std::print-style Logging and Beyond

Talkat C++ on Sea 2024 · 2024-07-02..07-05· [software-architecture]
links:none on file
slides:none on file

Migrates C printf-style logging to libfmt's fmt::printf then to fmt::print/std::print using custom clang-tidy checks that convert format strings, add casts for sign/width quirks, and run automated fixes and lit tests; the tooling changes 7,000 lines across ~440 files, lands a modified clang-tidy modernize-use-std-print check upstream, uncovers a unit-test crash caused by exception handling and narrows it with git bisect, and proves the conversion workflow works with some remaining macro and template edge cases.

AI-written summary · about

  1. 0:00Introduction and context
  2. 2:08Legacy logging challenges
  3. 5:43Format type safety issues
  4. 8:52Transitioning to {fmt}
  5. 11:49Getting started with clang-tidy
  6. 16:44Custom clang-tidy checkers
  7. 20:00Printf to std::print conversion
  8. 28:43Applying bulk code changes
  9. 30:51Debugging refactoring errors
  10. 33:58Future logging improvements
  11. 35:31Standardizing helper functions
  12. 37:26Advanced clang-tidy challenges
  13. 38:59Reflections on tool development
~/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.