Skip to main content

Module external_function

Module external_function 

Source

StructsΒ§

IndexBuilder πŸ”’
HIR visitor that records every FunctionId referenced via an Ident and every name on the right-hand side of a super.<name> access. Stmt/expr recursion is handled by hir::Visit’s default walks so adding a new HIR variant only updates this in one place.
ParamEscapeFinder πŸ”’
ProjectIndex πŸ”’

ConstantsΒ§

PROJECT_INDEX πŸ”’
Project index keyed by the [hir::Hir] address. The HIR lives inside the [solar::sema::Compiler] for the whole lint run, so its address is stable and the same index can be reused across every contract instead of rebuilt per source.

StaticsΒ§

EXTERNAL_FUNCTION

FunctionsΒ§

any_override_referenced πŸ”’
Returns true if any function in contract_id or a derivative shares base’s name and arity and is present in referenced (a call to an override conceptually targets the base’s slot). Match is name + arity only β€” solar’s HIR TypeKind has no structural equality β€” so same-arity overloads are conflated, yielding only false negatives.
body_escapes_params πŸ”’
Returns true if any param is written, aliased, or passed to a callee that could mutate it via the internal-call memory-reference aliasing rule.
build_project_index πŸ”’
expr_root_is_param πŸ”’
Returns true if the root of expr β€” after peeling parens / members / indexes / slices β€” is an Ident resolving to one of params.
is_type_conversion_callee πŸ”’
Returns true if callee is a type conversion or new T(...) expression.
lhs_is_local_memory_reference πŸ”’
Returns true if the root of lhs resolves to a local variable with reference type in memory.
modifier_args_reference_params πŸ”’
Returns true if any modifier invocation passes one of params as an argument. Modifier memory args alias caller memory the same way internal call args do.
project_index_for πŸ”’
super_called_from_derivative πŸ”’
Returns true if any strict descendant of base_contract_id contains a super.<name> call (the only callsites that can resolve into base_contract_id).