~/talk

Automatic C++ source code generation with clang

Talkat ACCU 2017 · 2017-04-24..04-29· [compilers-and-language-design]
links:none on file
slides:none on file

Shows how to write a custom C++ source-generation tool using clang 3.9 and its libTooling library to analyze existing code and emit new C++ (examples include enum-to-string converters). Covers building the tool from scratch: argument handling, invoking clang, walking the AST to find targets, producing generated code, and integrating the tool into a CMake build. Uses simple, concrete examples to illustrate the approach.

AI-written summary · about

  1. 0:00Start
  2. 4:59Introduction
  3. 9:25Brief tour to Clang C++ API - Infrastructure
  4. 13:08Brief tour to Clang C++ API - AST
  5. 17:21Brief tour to Clang C++ API - Utilities
  6. 20:30Generation tool implementation - Enum2 String
  7. 21:12Generation tool implementation - Preparations
  8. 28:31Generation tool implementation - AST analysis
  9. 35:38Generation tool implementation - Generation
  10. 39:07Generation tool implementation - Build
  11. 41:11Generation tool usage
  12. 45:55References
~/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.