Files
Language-Server/tests/corpus/frontend
faumaray ec86a79a1a Report full function extents from the stock observer
The observer emits an optional extent inside each proven definition
span from the body's last statement finish (the C++ frontend does not
set function_end_locus). The occurrence decoder binds it to the same
snapshot through the negotiated encoding and rejects malformed
extents; call hierarchy attributes nested calls to the enclosing
extent. A real stdio session reported both inner calls as outgoing
from outer, and the observer and occurrence corpora still pass.
2026-12-05 17:28:59 +03:00
..

C++26 frontend reference

Run the corpus from the repository with GCC 16.2 and the full VoidLibrary source include directory. The test needs both the public Meta header and its Detail implementation.

dev cpp-gcc -c python3 tests/corpus/frontend/verify-gcc.py \
    --void-include build/bootstrap/_deps/voidlibrary-src/include

Each invocation creates its own module cache in a temporary directory. The runner checks both enum helper entry points, the GCC reflection feature macro, constexpr range expansion, a named module and a reflection splice in its importer. It verifies the output of the compiled programs and the locations of two deliberately malformed edits before analyzing the valid importer again. Retain the fixture line and column positions when reformatting.

On GCC 16.2, VoidLibrary main 7d7d23e and libstdc++ dated 20260807, all 19 checks matched their expected results. Six cases require compiler diagnostics. Editor queries and the candidate compiler have separate acceptance criteria in roadmap 08.

Probe a locally built candidate using the target triple and standard-library include directories obtained from the reference GCC driver. The candidate uses its own compiler resource headers.

dev cpp-gcc -c python3 tests/corpus/frontend/probe-clang.py \
    --clang build/frontend-gate/llvm/bin/clang \
    --void-include build/bootstrap/_deps/voidlibrary-src/include

The JSON report includes driver arguments and each case's exit status and diagnostics. The process returns nonzero when a tested input fails. On candidate 562409c7, six of ten cases passed. The public and internal Void enum helper checks, the reference meta library and its module importer failed.

Run the GCC tooling experiment with dev cpp-gcc -c python3 tests/corpus/frontend/probe-gcc-tooling.py. It checks overload and member bindings in compiler trees, diagnostics after invalid edits, recovery, two private module generations and nested consteval instantiation. Returned timings measure individual compiler invocations. The projected edits use temporary source files and preserve the saved fixture.

Live returns on stock GCC

On x86-64 Linux, run the standalone observation with GCC 16.2.0, its matching plugin development headers, GMP headers and a Python-enabled GDB. If GMP is in a separate development prefix, append --include-dir /path/to/gmp/include.

dev cpp-gcc -c python3 tests/corpus/frontend/verify-stock-gcc-gdb.py

The probe compiles a small type-description object for GDB. It launches the installed cc1plus on the existing gcc-live.cpp fixture with ordinary compilation flags. The first run observes inner/outer returns of 17/34 and 22/44. Changing the enumerator to 41 produces 41/82 and 46/92 with the same two assertions. Both members of each pair are read at live return stops in the same process. This probe depends on the named evaluator remaining observable in the selected GCC binary. Constraint decisions, splices as individual events and full editor debugging have separate verification gates.