def banged

bend-lint-rules@0.2.0.0 · performance/gpu_fit.bend:269

import bend-lint-rules@0.2.0.0/performance/gpu_fit.bend as GpuFit
import Base
import bend-lint-api@0.2.0.0/linter/lint.bend as Lint
import bend-lint-api@0.2.0.0/shared/sets.bend as Sets

269# The finding about a `!` call of a definition of the program (`info`), unless the call only frees (`drop`):
270# performance/drop_in_bang reports that.
271def banged(
272  info: Maybe<&2, Lint.Def>,
273  drop: Bool,
274  callee: String,
275  under: Set(),
276  slots: List<&2, Slot>,
277  span: Maybe<&2, Lint.Span>
278) -> List<&2, Lint.Finding>:
279  match info drop:
280    case Some{Lint.Def{t, params, forks, calls, r}} False{}:
281      banged.of(Sets.has(under, t), data(params, None{}, slots), callee, span)
282    case _ _:
283      []

Uses (12)

Used by (1)