Day 13 of 30 · Clang frontend
Navigate the Clang source tree
- Time
- About 150 minutes: 40 reading, 80 lab, 20 testing, 10 notes.
Toolchain: current-main build
Use build/bin/clang++ and build/bin/llvm-lit from your llvm-main checkout, not whichever clang++ is first on PATH. Reproduce upstream behavior on current main and record the commit SHA. Setup guide
Learn
- Lex, Parse, AST, Sema, Basic and CodeGen.
Read Reading
- R9 · Clang internals manual
Internals overview and the relevant library sections · 40 min
Reading budgets cover selected sections, not whole chapters. Link to the book; this site does not reproduce it.
Build Build or investigate
- Locate
clang/lib/Lex,Parse,AST,SemaandCodeGen, plusclang/include/clang/Basicandclang/test. - Search for a diagnostic you can trigger.
- Follow its definition to a caller.
- Keep a source map with paths and one responsibility each.
Done when
A source map and one diagnostic traced from output text into implementation.
Recall question
Which directories would you investigate for a valid program rejected during type checking?
Completion checks
Progress tracking needs JavaScript. The lesson above is complete without it.
Notes
Saved only in this browser. Keep it short enough to finish in ten minutes; none of the prompts are required. All notes, export and import