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.
This commit is contained in:
faumaray committed 2026-12-05 17:28:59 +03:00
1 parent a098e45dc9
commit ec86a79a1a
11 files changed
+239 -11

No files matched your search

+21
View File
@@ -79,6 +79,27 @@ the upgraded snapshot (keeping `snapshot.prev.json`) and rewrites a legacy
about 25-30s in a Debug build (it passed VBS at ~27s); the full CMake run then
passed 18/18.
## December 5 full function extents from the stock observer
The stock occurrence observer now reports an optional `extent` inside each
proven definition span: the body's last statement finish location, because the
C++ frontend never sets `function_end_locus`. The occurrence decoder binds it to
the same snapshot through the negotiated encoding (malformed extents reject the
report), and call hierarchy attributes nested calls to the enclosing definition
extent. The corpus verifier validates the extent shape and ordering.
Real stdio session with nested calls:
```
prepare: [('outer', 'main.cpp', {'start': {'line': 1, 'character': 4}, 'end': {'line': 1, 'character': 9}})]
incoming: [('main.cpp', 1, 1)]
outgoing: [('inner', 2)]
```
`outgoing` now reports both `inner()` calls from `outer`, and `inner` remains
file-level for its caller because `main` is never a call target. The stock
observer corpus passed all cases and the stock occurrence corpus still selected
the `string_view`/`byte_span` overloads. All 18 native suites and all 18 CMake
tests passed.
## December 5 outgoing call hierarchy
`callHierarchy/outgoingCalls` is wired through