From 87f92f36d0167ddd228c396a6d381d4e94aea7d9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 23 Mar 2026 17:14:08 +0000 Subject: [PATCH] Fix override annotations and remove final predicate clashes in SSA.qll Co-authored-by: owen-mc <62447351+owen-mc@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/codeql/sessions/b400ebd5-4095-401e-8811-fb550600b3c4 --- go/ql/lib/semmle/go/dataflow/SSA.qll | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/go/ql/lib/semmle/go/dataflow/SSA.qll b/go/ql/lib/semmle/go/dataflow/SSA.qll index 3cc6d4304fd..8f3c2f7c996 100644 --- a/go/ql/lib/semmle/go/dataflow/SSA.qll +++ b/go/ql/lib/semmle/go/dataflow/SSA.qll @@ -65,7 +65,7 @@ private predicate unresolvedIdentifier(Ident id, string name) { */ class SsaVariable extends Definition { /** Gets the source variable corresponding to this SSA variable. */ - SsaSourceVariable getSourceVariable() { this.definesAt(result, _, _) } + override SsaSourceVariable getSourceVariable() { this.definesAt(result, _, _) } /** Gets the (unique) definition of this SSA variable. */ SsaDefinition getDefinition() { result = this } @@ -98,7 +98,7 @@ class SsaVariable extends Definition { } /** Gets the location of this SSA variable. */ - Location getLocation() { result = this.(SsaDefinition).getLocation() } + override Location getLocation() { result = this.(SsaDefinition).getLocation() } /** * DEPRECATED: Use `getLocation()` instead. @@ -124,12 +124,7 @@ class SsaDefinition extends Definition { SsaVariable getVariable() { result = this } /** Gets the source variable defined by this definition. */ - SsaSourceVariable getSourceVariable() { this.definesAt(result, _, _) } - - /** - * Gets the basic block to which this definition belongs. - */ - BasicBlock getBasicBlock() { this.definesAt(_, result, _) } + override SsaSourceVariable getSourceVariable() { this.definesAt(result, _, _) } /** Gets the innermost function or file to which this SSA definition belongs. */ ControlFlow::Root getRoot() { result = this.getBasicBlock().getScope() }