Lexical macro references are query-local facts. A cancelled or bounded
walk is kept distinct from a complete empty enumeration so authoritative
inverse callers can preserve their completeness status.
Per-query C++ visibility facts with a borrowed source and scope proof.
Cache only data() across calls, and reattach the current source and token
with from_data; cloning the analyzer would lose its query read cache.
Why template-argument resolution failed. Definition diagnostics render
each mode differently; graph scans only care that the resolution is
unproven and match Err(_).
The source-backed declaration introduced by a function-like macro. The
declaration belongs to the macro definition, while the reference range
returned by VisibilityIndex::macro_lexical_references belongs to the
definition body, invocation argument, or caller scope where substitution
makes the binding visible.
Resolve an anonymous C aggregate’s generated owner from its declaration
range. Anonymous local structs and unions have no type name to enter into
the visibility index; declaration extraction gives them a structured class
identity keyed by the aggregate node’s exact CST range instead. Matching
that range keeps nested aggregates and unrelated generated owners out of
the result without inspecting source text.
The preprocessor requirements a scope-level binding (a using declaration or
directive, or a namespace alias) stands under, or None when its guard
environment cannot be represented.
The argument list a call-shaped node supplies: f(args), new T(args),
T{args} and the member initializer : field(args), whose grammar gives its
argument list no field name.
Whether a structured using-declaration scope can name qualified as an
ancestor class. The boundary check prevents Base from matching
OtherBase while allowing a relative Base spelling to match ns::Base.
Walk tag-specifier ancestors until a type-reference context makes its name
an operand rather than a declaration. Callers retain their own terminal
declaration boundaries after this shared exclusion scan.
Admit an ABI 15 template-function shape to type resolution only through
the structured argument list of a type descriptor. This is syntax evidence;
callers must still resolve a visible type binding before proving identity.
Whether a member-initializer field(args) runs the declared type’s
constructor: only a member that holds the type by value does. Owner* p
initialized as p(nullptr) binds a pointer and Owner& r as r(other)
binds a reference; neither runs an Owner constructor (#3286). A member
whose declaration the index cannot decode keeps the by-value reading, the
same assumption the usage scan’s declared-type match makes.
Whether node is the member leaf of an offsetof_expression, including a
malformed type operand. Callers use this guard to prevent the ordinary
field-name heuristics from guessing an owner after structured resolution
has failed.
Whether node is the direct structured type payload of a template
argument. This role remains meaningful even when a surrounding expression
is below tree-sitter recovery, because both the template_argument_list
and the type_descriptor retain their named fields.
The macro-declaration grammar’s clean reading of the head
recovered_macro_decorated_type_node recovers: API static inline T make() parses as a leading macro_modifier and T as the declaration’s
type. Accepts the same type kinds and declaration containers as the
recovered form, so a rule keyed on that macro-decorated head keeps its
scope across both grammars.
True when each structured qualifier on the callable-name path has a real
:: token. A macro-prefixed return type can make tree-sitter insert a
zero-width missing separator and parse TYPE Result<T> method() as the
false qualified declarator Result<T>::method.
The bogus function_definition the macro-declaration grammar builds for a
C call whose argument list a Clang block literal breaks: f(first, ^(T b) { ... }) reads as a definition whose declarator ends at the block’s (,
with the block body as the function body. The older grammar kept the
call_expression and left the damage inside its argument list. The
declarator must carry the damage, and the envelope must sit in statement
context: a clean type-less definition is a real one (a constructor).
Return the declaration/function type displaced by a macro-shaped
qualified declarator, together with the enclosing declaration context.
Callers use the macro scope only as structural admission evidence; the
returned node is the real type reference to resolve and record.
Like precise_parent_of, but drops module (namespace) parents. A namespace is a scope, not a
type or receiver, so namespace-scoped functions and constants resolve as free functions and
globals rather than members.
Expand a C++ type-name component to the complete written reference that
owns it. Qualified path wrappers that stop before a later component remain
separate, so a type used as an owner keeps its prefix range.