mirror of
https://github.com/github/codeql.git
synced 2026-07-26 21:44:02 +02:00
For a call qualified through a not-null assertion (e.g. `s!!.foo()`), `TrapWriter.getStartOffset` derives the call's start from its receiver. Under K1 the receiver is the `CHECK_NOT_NULL`/EXCLEXCL intrinsic IrCall, whose own `startOffset` points at the first `!` character rather than at the operand `s`. The enclosing call therefore inherited the `!!` offset and omitted the receiver operand from its span. The `!!` intrinsic carries its operand as value argument 0 (not as a dispatch/extension receiver), so the existing receiver-based adjustment did not reach it. Extend `getStartOffset` to also consider value argument 0 of an EXCLEXCL call, recursively. This makes a `!!`-qualified call span from the operand, matching K2, which already anchors the receiver at the operand. The change affects source locations only; AST structure, call targets, and dataflow relationships are unchanged. K2 output is unaffected because its offsets already start at the operand. Fully converges dataflow/notnullexpr and exprs/binop between the K1 and K2 suites and removes 6 divergent rows overall. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 86bfc022-3ecc-4746-ba23-3b76c4e4c3e4