Day 15 of 30 · Clang frontend
Learn the LLVM regression test workflow
- 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
- lit, RUN lines, substitutions and diagnostic expectations.
Read Reading
- R10 · LLVM testing guide
Regression testing · 25 min - R11 · Hacking on Clang
Testing and debugging sections; prefer the current CMake workflow · 15 min
Reading budgets cover selected sections, not whole chapters. Link to the book; this site does not reproduce it.
Build Build or investigate
- Build Clang test dependencies.
- Run one existing SemaCXX test through
build/bin/llvm-lit. - Make a temporary scratch test with the diagnostic example in the commands section.
- Deliberately break its expected message, observe failure, then restore it.
Done when
A recorded passing and intentionally failing lit run, including the exact compiler path.
Recall question
Why should %clang_cc1 appear in a test RUN line rather than be typed into your shell?
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