Day 15 of 30 · Clang frontend

Learn the LLVM regression test workflow

Time
About 150 minutes: 40 reading, 80 lab, 20 testing, 10 notes.
Prerequisites
Day 02: Prepare a reproducible learning environment, Day 13: Navigate the Clang source tree

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

Reading budgets cover selected sections, not whole chapters. Link to the book; this site does not reproduce it.

Build Build or investigate

  1. Build Clang test dependencies.
  2. Run one existing SemaCXX test through build/bin/llvm-lit.
  3. Make a temporary scratch test with the diagnostic example in the commands section.
  4. 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.

Required to complete day 15

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