import type { ParsedFile, ScopeId } from '../../../../_shared/index.js';
interface RangeKeyShape {
    readonly startLine: number;
    readonly startCol: number;
    readonly endLine: number;
    readonly endCol: number;
}
/** Record a symbol name as file-local (static or anonymous namespace). */
export declare function markFileLocal(filePath: string, name: string): void;
/** Check whether a symbol name has file-local linkage in the given file. */
export declare function isFileLocal(filePath: string, name: string): boolean;
/** Capture-time: record an anonymous `namespace_definition` source range. */
export declare function markCppAnonymousNamespaceRange(filePath: string, range: RangeKeyShape): void;
/** Predicate consumed by `populateCppNonGloballyVisible` and
 *  `expandCppWildcardNames` to exempt anonymous-namespace scopes from
 *  the cross-file unqualified-lookup exclusion that applies to ordinary
 *  named namespaces. */
export declare function isCppAnonymousNamespaceScope(scopeId: ScopeId): boolean;
/** Clear tracked file-local names (call at start of each resolution pass). */
export declare function clearFileLocalNames(): void;
/** Resolve recorded anonymous-namespace source ranges to `ScopeId`s.
 *  Must run inside `populateOwners` BEFORE `populateCppNonGloballyVisible`
 *  consults the resolved set. */
export declare function populateCppAnonymousNamespaceScopes(parsed: {
    readonly filePath: string;
    readonly scopes: readonly {
        readonly id: ScopeId;
        readonly kind: string;
        readonly range: RangeKeyShape;
    }[];
}): void;
/**
 * Populate per-file "not globally visible" nodeIds by walking the parsed
 * file's scopes. Run as part of the `populateOwners` hook so every C++
 * scope is reflected before any cross-file resolution pass consults the
 * set.
 *
 * A def is "not globally visible" when its nearest structurally enclosing
 * scope is a `Namespace` or `Class` — those require qualification
 * (`ns::name`, `Class::method`) for cross-file unqualified lookup.
 * Module-scoped defs remain globally visible.
 */
export declare function populateCppNonGloballyVisible(parsed: {
    readonly filePath: string;
    readonly scopes: readonly {
        readonly id: ScopeId;
        readonly kind: string;
        readonly ownedDefs: readonly {
            readonly nodeId: string;
        }[];
    }[];
}): void;
/**
 * Check whether a def is visible by unqualified lookup from outside its
 * own file. Returns `false` for class-owned and namespace-nested defs.
 *
 * Used by the global free-call fallback's `isFileLocalDef` hook (which
 * historically meant "static / anonymous-namespace" but semantically
 * stands for "logically invisible cross-file"). Including class methods
 * and namespace members under the same negative answer fixes the leak
 * where unqualified `save()` resolved to `User::save` through a shared
 * workspace registry walk.
 */
export declare function isCppDefGloballyVisible(filePath: string, nodeId: string): boolean;
/**
 * Return the names visible through a C++ wildcard import (`#include` or
 * `using namespace`).
 *
 * ## Contract
 *
 * C++ unqualified name lookup only sees names at the importer's enclosing
 * scope. Class members and namespace-nested symbols are NOT visible by
 * unqualified lookup from a free function in an including TU — they must
 * be reached via `Class::method`, `ns::name`, or a working `using`
 * declaration. The filter below enforces that contract for header
 * propagation: only defs whose nearest enclosing scope is the header's
 * `Module` scope are emitted as wildcard-binding names.
 *
 * ## Why scope-aware and not predicate-on-qualifiedName
 *
 * A naive `def.qualifiedName.indexOf('.') === -1` check is unreliable
 * because `populateClassOwnedMembers`
 * (`gitnexus/src/core/ingestion/scope-resolution/scope/walkers.ts`)
 * only dot-qualifies `qualifiedName` for `Class` scopes. Namespace-nested
 * defs (`namespace ns { void foo(); }`) arrive in `localDefs` with
 * `qualifiedName === 'foo'` and `ownerId === undefined`, indistinguishable
 * from a top-level free function. The structural truth lives in
 * `Scope.ownedDefs`: each scope lists what it structurally owns; the
 * Module scope owns only top-level symbols. We look the def up by
 * `nodeId` against the scope tree to identify its owning kind.
 *
 * ## `localDefs` consumer survey (recorded for future maintainers)
 *
 * Other consumers of `ParsedFile.localDefs` were audited at the time
 * this filter was introduced (see PR #1520 / plan
 * `docs/plans/2026-05-12-002-fix-cpp-resolver-followups-plan.md`):
 *
 *   - `finalize-orchestrator.ts:113,163` — flattens defs into a workspace
 *     registry keyed by `ownerId` + `qualifiedName`; class-owned and
 *     namespace-owned symbols are registered under their owner, not as
 *     unqualified names. Not a leak surface.
 *   - `csharp/namespace-siblings.ts:307`, `go/expand-wildcards.ts:86`,
 *     `php/scope-resolver.ts:141,151`, `c/static-linkage.ts:51` — other
 *     languages' own wildcard / sibling expansions. Each owns its own
 *     visibility contract.
 *   - `receiver-bound-calls.ts:99`, `reconcile-ownership.ts:66,119`,
 *     `mro.ts:61` — keyed by `ownerId` for member lookup, never used
 *     as unqualified bindings.
 *   - `go/interface-impls.ts:40,53`, `go/package-siblings.ts:41` — Go-
 *     specific, sibling-package scoped.
 *
 * No other consumer treats `localDefs` as a flat unqualified-binding
 * set the way this function did before the fix. If a future consumer
 * does, mirror this filter or harden registration so class/namespace
 * members never enter `localDefs` unqualified.
 */
export declare function expandCppWildcardNames(targetModuleScope: ScopeId, parsedFiles: readonly ParsedFile[]): readonly string[];
export {};
