Skip to content

feat(inlay hints): designators, dependent calls, config, semantics walk - #565

Merged
16bit-ykiko merged 7 commits into
mainfrom
test/inlay-hints-snap-corpus
Aug 1, 2026
Merged

16bit-ykiko merged 7 commits into
mainfrom
test/inlay-hints-snap-corpus

Conversation

@16bit-ykiko

@16bit-ykiko 16bit-ykiko commented Jul 31, 2026 •

Copy link
Copy Markdown
Member

Continues the per-feature test-weaving campaign (#564): inlay hints get their snap corpus, fixture-generated docs, and — since the tests exist to be acted on — fixes for everything they surfaced, plus the configuration section the feature never had. With the corpus in place as a safety net, the traversal itself then moves onto the shared semantics node table.

Feature fixes

  • Designator hints implemented: Point{1, 2} renders .x=/.y=, nested aggregates flatten (.b.x=), anonymous unions/structs vanish from the path, /*name=*/ comments and written designators suppress, and broken initializers keep their surviving designators. Uses getUnwrittenDesignators from the clang-tidy utils the prebuilt LLVM already ships.
  • Dependent-call parameter hints: calls in template bodies (apply(value), holder.member(value), Holder<T>::static_member(value)) resolve through the template resolver's arity-filtered candidate set; only a unique candidate names parameters, so ambiguous overloads stay bare instead of guessing.
  • Freestanding builtin suppression: -ffreestanding strips library-builtin IDs, which made std::forward(x) grow a stray & hint. The suppression now also matches the cast-like std names, constrained to single-parameter functions so the three-argument std::move algorithm keeps its hints.
  • Default-argument hints no longer vanish when parameter hints are disabled; a latent null deref on getCalleeDecl() is gone.

[inlay_hints] configuration

New config section (clice.toml / initializationOptions): enabled, parameters, deduced_types, designators, block_end, default_arguments, type_name_limit. Defaults come from feature::InlayHintsOptions itself, so config and feature cannot disagree. The master resolves options from workspace config per query and ships them in QueryParams, replacing the hardcoded defaults in the stateful worker — block-end and default-argument hints were previously unreachable on the wire. Documented in the configuration guide; an integration test pins the end-to-end path with a default-config control.

Snap corpus & docs

38 per-topic fixtures replace the four seed files; every active fixture is snap: shared between the standalone and wire paths. Fixture headers generate docs/en/features/inlay-hints.md (parameter/type/designator sections plus unsupported stubs for CTAD, template-parameter and conversion hints); option-gated categories are documented by hand since the default-option snap paths cannot reach them. Unit tests shrink to what the corpus cannot express: block-end, default arguments, the option gates, and freestanding builtin suppression.

Edge coverage migrated from the deleted unit cases before removal: decltype in every written position, tuple-protocol bindings, scope suppression, pack head/tail forwarding, explicit-instantiation dedup, macro call-site shapes, MS property pseudo-objects, deducing this.

Known gaps stay pinned as partial/unsupported fixtures: case-insensitive name matching (clangd#2248), inherited-constructor names (clangd#1364), dependent auto (clangd#2275), redundant hints on explicit casts (clangd#1749), parenthesized aggregates (clangd#2540).

Traversal rewritten onto the semantics node table

The feature's RecursiveASTVisitor is gone: hints are collected by a single Collector walking the unit's cached Semantics node table — the same flat DFS pre-order record of the written AST that already serves selection and semantic tokens — so the traversal runs once per parse instead of once per request, and traversal policy lives in exactly one place. Subtree skipping becomes an index jump over subtree_end (the MS-property assignment case included), and the old Builder/Visitor split collapses into the one class since nothing forces a CRTP visitor anymore.

Two table contracts surfaced during the migration:

  • A PseudoObjectExpr records only its syntactic subtree; the accessor call of an MS property subscript read lives in the semantic forms and is derived on demand from the recorded wrapper, keeping the row:/column: hints.
  • The outermost InitListExpr enters the table as its semantic form (the pointer its AST parent stores). Designator handling normalizes back to the syntactic form — the visitor used to do that normalization for every consumer implicitly, and four designator fixtures caught the divergence byte-for-byte before it could ship.

The corpus doubled as the equivalence net: every snapshot is byte-identical across the rewrite. One fixture extension pins parameter hints in default member initializers, a construct the corpus previously reached only through constructor-initializer lists.

Verification

All four suites green locally: unit 1176, integration 336 (new config round-trip test included), smoke 3/3, snap 256 (+50 intentional skips), npm run check clean; unit and snap additionally pass against the Debug build with assertions on. Two rounds of three-way pre-PR review (correctness / style / coverage) applied: over-matching builtin fallback, dependent explicit-object argument drop, doc machinery leak, and naming/coverage fixes on the table walk.

…n hints

- Designator hints via clang-tidy's getUnwrittenDesignators (the shipped
  prebuilt already links clangTidyUtils).
- Dependent calls resolve through the unit's TemplateResolver; only a
  unique arity-viable candidate names parameters.
- std::move/forward suppression now also matches by name in std, since
  -ffreestanding compiles carry no library-builtin IDs.
- VisitCallExpr no longer drops default-argument hints when parameter
  hints are disabled.
Options resolve from workspace config per query in forward_query and
travel inside QueryParams, replacing the hardcoded defaults in the
stateful worker. Defaults come from feature::InlayHintsOptions itself so
config and feature can never disagree.
38 per-topic fixtures replace the four seed files; fixture headers
generate docs/en/features/inlay-hints.md. Unit tests keep only the
option-gated categories (block-end, default arguments) the default-option
snap paths cannot reach.
- The freestanding name fallback in is_simple_builtin now requires a
  single parameter, so the three-argument std::move algorithm keeps its
  hints (pinned in param_setters_builtins).
- Dependent member calls no longer drop their first argument when the
  resolved candidate uses an explicit object parameter.
- Reword the dependent-calls fixture header to keep internal machinery
  out of the generated doc.
- New unit coverage: enabled=false gate, freestanding std::forward
  suppression, default arguments with parameters disabled.
@coderabbitai

coderabbitai Bot commented Jul 31, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The change adds configurable inlay-hint options, propagates them through worker queries, expands parameter and designator resolution, and adds fixture-based coverage for parameter, type, default-argument, and aggregate hints. Documentation is now generated from fixtures.

Changes

Inlay hints

Layer / File(s) Summary
Configuration and query propagation
src/server/state/*, src/server/compiler/compiler.cpp, src/server/protocol/worker.h, src/server/worker/stateful_worker.cpp, tests/unit/server/config_tests.cpp, tests/integration/lifecycle/config.test.ts
Adds seven inlay-hint options, applies defaults, forwards settings through worker queries, and validates configuration behavior.
Hint resolution and traversal
src/feature/inlay_hints.cpp, tests/unit/feature/inlay_hint_tests.cpp
Uses cached semantic traversal, resolves unique dependent calls, adds designator hints, handles default-argument limits, and preserves block-end and type-hint behavior.
Parameter hint coverage
tests/snap/inlay_hint/param_*.cpp, tests/snap/inlay_hint/param_*.snap.yml, tests/snap/inlay_hint/conversion_hints.cpp, tests/snap/inlay_hint/ctad_arguments.cpp
Adds fixture coverage for parameter names, suppression, forwarding, references, dependent calls, constructors, operators, macros, conversions, packs, callable objects, and builtin-like calls.
Designator and type coverage
tests/snap/inlay_hint/designator_*, tests/snap/inlay_hint/type_*
Adds snapshots for aggregate designators, deduction, return types, structured bindings, decltype, lambdas, scopes, dependent types, and type spelling.
Generated documentation and tooling
docs/en/features/inlay-hints.md, docs/en/guide/configuration.md, tools/feature_docs.ts, tools/snap/standalone.ts
Replaces checklist documentation with generated examples, documents [inlay_hints], and configures fixture documentation and compilation.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 3.23% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main inlay-hint features, configuration work, and traversal refactor in the changeset.
Description check ✅ Passed The description directly explains the inlay-hint features, configuration changes, traversal refactor, tests, and documentation included in the changeset.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/inlay-hints-snap-corpus

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ab8835ea12

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/feature/inlay_hints.cpp Outdated
Comment thread docs/en/guide/configuration.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/en/guide/configuration.md`:
- Line 135: Clarify the `[inlay_hints]` documentation by stating that edits to
`clice.toml` take effect only after restarting the server, after which a
client-side refresh is sufficient to apply the per-request options. Remove the
ambiguity between client refresh and server configuration reload.

In `@tests/snap/inlay_hint/param_explicit_instantiation.cpp`:
- Line 12: Update the explicit instantiation in the fixture to an
explicit-instantiation declaration by adding the required extern specifier to
template apply<int>. Preserve the existing signature and test scenario for
duplicate hints.

In `@tests/snap/inlay_hint/param_names.cpp`:
- Around line 10-12: Update the Point fixture to test an actual move-constructor
call: add an explicit Point(Point&&) declaration/definition and construct the
target from an xvalue such as a moved Point instance. Ensure the test no longer
relies on C++17 prvalue elision, so move-constructor hint suppression is
exercised.

In `@tests/snap/inlay_hint/type_bindings_tuple.cpp`:
- Around line 13-31: Replace the manually declared std::tuple_size and
std::tuple_element primary templates with the appropriate standard library
header inclusion, while retaining only the IntPair specializations and their
existing values/types.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 0dc4a832-015d-4a13-928d-9cd377c9ac9c

📥 Commits

Reviewing files that changed from the base of the PR and between 8b70d8b and ab8835e.

📒 Files selected for processing (97)
  • docs/en/features/inlay-hints.md
  • docs/en/guide/configuration.md
  • src/feature/inlay_hints.cpp
  • src/server/compiler/compiler.cpp
  • src/server/protocol/worker.h
  • src/server/state/config.cpp
  • src/server/state/config.h
  • src/server/worker/stateful_worker.cpp
  • tests/integration/lifecycle/config.test.ts
  • tests/snap/inlay_hint/basic.cpp
  • tests/snap/inlay_hint/basic.snap.yml
  • tests/snap/inlay_hint/conversion_hints.cpp
  • tests/snap/inlay_hint/ctad_arguments.cpp
  • tests/snap/inlay_hint/designator_aggregates_only.cpp
  • tests/snap/inlay_hint/designator_aggregates_only.snap.yml
  • tests/snap/inlay_hint/designator_anonymous.cpp
  • tests/snap/inlay_hint/designator_anonymous.snap.yml
  • tests/snap/inlay_hint/designator_basic.cpp
  • tests/snap/inlay_hint/designator_basic.snap.yml
  • tests/snap/inlay_hint/designator_nested.cpp
  • tests/snap/inlay_hint/designator_nested.snap.yml
  • tests/snap/inlay_hint/designator_parenthesized.cpp
  • tests/snap/inlay_hint/designator_recovery.cpp
  • tests/snap/inlay_hint/designator_recovery.snap.yml
  • tests/snap/inlay_hint/designator_suppression.cpp
  • tests/snap/inlay_hint/designator_suppression.snap.yml
  • tests/snap/inlay_hint/designators.cpp
  • tests/snap/inlay_hint/designators.snap.yml
  • tests/snap/inlay_hint/param_anonymous.cpp
  • tests/snap/inlay_hint/param_anonymous.snap.yml
  • tests/snap/inlay_hint/param_case_insensitive.cpp
  • tests/snap/inlay_hint/param_case_insensitive.snap.yml
  • tests/snap/inlay_hint/param_deducing_this.cpp
  • tests/snap/inlay_hint/param_deducing_this.snap.yml
  • tests/snap/inlay_hint/param_definition_names.cpp
  • tests/snap/inlay_hint/param_definition_names.snap.yml
  • tests/snap/inlay_hint/param_dependent.cpp
  • tests/snap/inlay_hint/param_dependent.snap.yml
  • tests/snap/inlay_hint/param_explicit_instantiation.cpp
  • tests/snap/inlay_hint/param_explicit_instantiation.snap.yml
  • tests/snap/inlay_hint/param_forwarding.cpp
  • tests/snap/inlay_hint/param_forwarding.snap.yml
  • tests/snap/inlay_hint/param_function_objects.cpp
  • tests/snap/inlay_hint/param_function_objects.snap.yml
  • tests/snap/inlay_hint/param_hints.cpp
  • tests/snap/inlay_hint/param_hints.snap.yml
  • tests/snap/inlay_hint/param_implicit_conversions.cpp
  • tests/snap/inlay_hint/param_implicit_conversions.snap.yml
  • tests/snap/inlay_hint/param_inherited_constructors.cpp
  • tests/snap/inlay_hint/param_inherited_constructors.snap.yml
  • tests/snap/inlay_hint/param_macros.cpp
  • tests/snap/inlay_hint/param_macros.snap.yml
  • tests/snap/inlay_hint/param_names.cpp
  • tests/snap/inlay_hint/param_names.snap.yml
  • tests/snap/inlay_hint/param_operators.cpp
  • tests/snap/inlay_hint/param_operators.snap.yml
  • tests/snap/inlay_hint/param_pack_constructors.cpp
  • tests/snap/inlay_hint/param_pack_constructors.snap.yml
  • tests/snap/inlay_hint/param_packs.cpp
  • tests/snap/inlay_hint/param_packs.snap.yml
  • tests/snap/inlay_hint/param_pseudo_objects.cpp
  • tests/snap/inlay_hint/param_pseudo_objects.snap.yml
  • tests/snap/inlay_hint/param_references.cpp
  • tests/snap/inlay_hint/param_references.snap.yml
  • tests/snap/inlay_hint/param_setters_builtins.cpp
  • tests/snap/inlay_hint/param_setters_builtins.snap.yml
  • tests/snap/inlay_hint/param_suppression.cpp
  • tests/snap/inlay_hint/param_suppression.snap.yml
  • tests/snap/inlay_hint/template_parameter_hints.cpp
  • tests/snap/inlay_hint/type_auto.cpp
  • tests/snap/inlay_hint/type_auto.snap.yml
  • tests/snap/inlay_hint/type_auto_params.cpp
  • tests/snap/inlay_hint/type_auto_params.snap.yml
  • tests/snap/inlay_hint/type_auto_return.cpp
  • tests/snap/inlay_hint/type_auto_return.snap.yml
  • tests/snap/inlay_hint/type_bindings_tuple.cpp
  • tests/snap/inlay_hint/type_bindings_tuple.snap.yml
  • tests/snap/inlay_hint/type_decltype.cpp
  • tests/snap/inlay_hint/type_decltype.snap.yml
  • tests/snap/inlay_hint/type_dependent.cpp
  • tests/snap/inlay_hint/type_dependent.snap.yml
  • tests/snap/inlay_hint/type_explicit_source.cpp
  • tests/snap/inlay_hint/type_explicit_source.snap.yml
  • tests/snap/inlay_hint/type_hints.cpp
  • tests/snap/inlay_hint/type_hints.snap.yml
  • tests/snap/inlay_hint/type_lambdas.cpp
  • tests/snap/inlay_hint/type_lambdas.snap.yml
  • tests/snap/inlay_hint/type_scopes.cpp
  • tests/snap/inlay_hint/type_scopes.snap.yml
  • tests/snap/inlay_hint/type_structured_bindings.cpp
  • tests/snap/inlay_hint/type_structured_bindings.snap.yml
  • tests/snap/inlay_hint/type_sugar.cpp
  • tests/snap/inlay_hint/type_sugar.snap.yml
  • tests/unit/feature/inlay_hint_tests.cpp
  • tests/unit/server/config_tests.cpp
  • tools/feature_docs.ts
  • tools/snap/standalone.ts
💤 Files with no reviewable changes (8)
  • tests/snap/inlay_hint/designators.cpp
  • tests/snap/inlay_hint/basic.cpp
  • tests/snap/inlay_hint/designators.snap.yml
  • tests/snap/inlay_hint/type_hints.snap.yml
  • tests/snap/inlay_hint/type_hints.cpp
  • tests/snap/inlay_hint/basic.snap.yml
  • tests/snap/inlay_hint/param_hints.cpp
  • tests/snap/inlay_hint/param_hints.snap.yml

Comment thread docs/en/guide/configuration.md Outdated
Comment thread tests/snap/inlay_hint/param_explicit_instantiation.cpp
Comment thread tests/snap/inlay_hint/param_names.cpp
Comment thread tests/snap/inlay_hint/type_bindings_tuple.cpp
The builtin-ID switch plus name fallback approximates "too common to
hint"; a curated table of qualified names and signature shapes is the
explicit form to grow toward.
- Default-argument hints now treat type_name_limit = 0 as unlimited,
  matching type hints and the documented contract.
- param_names gains a real move constructor exercised via an xvalue;
  the previous case only covered copy plus an elided prvalue.
- Reword the explicit-instantiation fixture title (definition, not
  declaration) and the configuration-effect wording in both docs.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9072bc4481

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/feature/inlay_hints.cpp
Replace the RecursiveASTVisitor traversal with a single Collector class
walking unit.semantics().node_entries(), aligning with semantic tokens.
The pre-order table drives dispatch; subtree skipping covers the MS
property assignment case, and semantic-form accessor calls of pseudo
object expressions are derived from the recorded wrapper on demand. The
outermost init list records its semantic form, so designator handling
normalizes back to the syntactic form. Pin default member initializer
parameter hints in the operators fixture.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/snap/inlay_hint/param_operators.snap.yml`:
- Around line 5-8: Update the param_operators snapshot entries to match the
fixture’s shifted line numbers: remove the stale hint at 17:16 and move the
hints for S defaulted{3}; and Holder() : member(42) {} to their regenerated
positions, preserving their exact columns and hint metadata.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1bcca9b9-d301-4288-a076-4b6a6551c360

📥 Commits

Reviewing files that changed from the base of the PR and between 9072bc4 and 52a3712.

📒 Files selected for processing (4)
  • docs/en/features/inlay-hints.md
  • src/feature/inlay_hints.cpp
  • tests/snap/inlay_hint/param_operators.cpp
  • tests/snap/inlay_hint/param_operators.snap.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/en/features/inlay-hints.md

Comment thread tests/snap/inlay_hint/param_operators.snap.yml
@16bit-ykiko 16bit-ykiko changed the title feat(inlay hints): designators, dependent calls, config, snap corpus feat(inlay hints): designators, dependent calls, config, semantics walk Aug 1, 2026
@16bit-ykiko
16bit-ykiko merged commit 25daba3 into main Aug 1, 2026
31 checks passed
@16bit-ykiko
16bit-ykiko deleted the test/inlay-hints-snap-corpus branch August 1, 2026 00:57
16bit-ykiko added a commit that referenced this pull request Aug 1, 2026
…ics walk (#566)

Third per-feature round after semantic tokens (#564) and inlay hints
(#565): document symbols gets its traversal migrated onto the
`Semantics` node table, four outline bugs fixed (plus one table-level
bug in the builder), and its snap corpus rewoven into 24 doc-generating
fixtures.

## Traversal migrated onto the semantics node table

`document_symbols.cpp` no longer runs a `FilteredASTVisitor` over the
TU. A single `Collector` walks the cached
`unit.semantics().node_entries()` — the DFS pre-order record of the
interested file's written AST. Nesting comes for free: a symbol's frame
stays open while the walk index is inside its `subtree_end`, so the
outline tree is rebuilt with a plain `(subtree_end, cursor)` stack, and
implicit instantiations are skipped as an index jump. The migration was
proven equivalent against the pre-existing snapshots and full unit suite
before any behavior was changed.

One behavior improvement falls out of the table's recording contract:
abbreviated function templates (`void f(Concept auto x)`) used to vanish
from the outline entirely — the written `FunctionDecl` hides inside an
implicit `FunctionTemplateDecl`, which the old visitor skipped
wholesale. The builder records written children of implicit decls, so
these functions now appear (pinned in `kinds_templates`).

## Table-level fix: structured bindings recorded twice

Namespace-scope `BindingDecl`s are members of the enclosing
`DeclContext` *and* explicitly traversed by
`TraverseDecompositionDecl`'s bindings loop, so the builder recorded
each one twice — every table consumer saw doubles (the outline showed
each binding twice). The builder now records a `BindingDecl` only when
its walk parent is its own `DecompositionDecl`. Block-scope and TU-scope
bindings were already single-visit; both are pinned.

## Outline fixes

- **Template specializations**: explicit and partial specializations of
class and variable templates never appeared (`is_interested` lacked
their decl kinds); their members were orphaned at namespace level. Now
`Box<void>`, `Box<T*>`, `pi<int>`, `pi<T*>` appear with members
correctly nested.
- **Type aliases**: `typedef`, `using` aliases and alias templates never
appeared at all. They now render with a `type alias` detail, mapped to
LSP `Class` (matching clangd).
- **Multi-token name selection ranges**: `~Widget` selected only the
`~`; `operator==` and `operator bool` selected only `operator`.
Selection ranges now come from `DeclarationNameInfo` and cover the full
written name.
- **Names spelled in macro arguments** (clangd#1941): `VAR(name)`
selected the macro name instead of `name`. The name range now goes
through `getFileLoc`, so argument-spelled names select their written
spelling while body-spelled names keep the invocation site; the symbol
range is widened when needed to preserve the LSP range ⊇ selection-range
invariant.

## Corpus rewoven: 24 fixtures, doc generated from them

The 4 seed fixtures were replaced by 24 itemized fixtures with `///` doc
headers; `document_symbol` is registered in `feature_docs.ts` and the
checklist sections of `docs/en/features/document-symbols.md` are now
generated from the corpus. Probes confirmed several checklist items are
supported by construction and are now pinned: default-argument stripping
(clangd#221), multiline signature ranges (clangd#2221), macro-expansion
symbol locations (clangd#475), friend function definitions, local
symbols inside function bodies (clangd#616), and UTF-16 column counting
(CJK fixture). Unsupported items (access-specifier grouping clangd#499,
base-class detail, macro/include/module/`#pragma mark` outline entries,
symbol tags clangd#2123) are recorded as compiled-out stubs. The
count-based unit tests are retired; every case they touched is pinned
structurally by a snapshot, including implicit instantiations *not*
appearing.

## Verification

All four suites green: unit (1168) and snap (280) on both RelWithDebInfo
and Debug (LLVM assertions), integration (336), smoke (3/3), `npm run
check`, `feature_docs.ts check`. Three-way pre-PR review (correctness /
style / test coverage); findings addressed: inline comment style, reuse
of `decls::is_implicit_instantiation`, and three added pins (implicit
instantiation absence, block-scope bindings, static data member + named
nested struct).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant