Day 18 of 30 · Clang frontend
Study one C++ semantic rule
- Time
- About 150 minutes: 45 reading, 75 lab, 20 testing, 10 notes.
- Prerequisites
- Day 17: Use FileCheck and trace a diagnostic
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
- A deliberately narrow slice of Sema.
Read Reading
- R9 · Clang internals manual
Relevant Sema discussion · 15 min - Your llvm-project checkout
The implementation and nearby tests for one rule · 30 min
Reading budgets cover selected sections, not whole chapters. Link to the book; this site does not reproduce it.
Build Build or investigate
- Pick one manageable topic: const-related diagnostics, invalid initialization or simple name lookup.
- Write five small C++ examples changing one property at a time.
- Predict results before compiling.
- Find the checking function and record the observed code path.
Done when
A five-case behavior matrix and one function you can explain in your own words.
Recall question
What evidence distinguishes an actual compiler bug from an incorrect expectation about C++?
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