Skip to content

Commit 6014289

Browse files
Copilotowen-mc
andauthored
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
1 parent 238824e commit 6014289

File tree

1 file changed

+3
-8
lines changed
  • go/ql/lib/semmle/go/dataflow

1 file changed

+3
-8
lines changed

go/ql/lib/semmle/go/dataflow/SSA.qll

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ private predicate unresolvedIdentifier(Ident id, string name) {
6565
*/
6666
class SsaVariable extends Definition {
6767
/** Gets the source variable corresponding to this SSA variable. */
68-
SsaSourceVariable getSourceVariable() { this.definesAt(result, _, _) }
68+
override SsaSourceVariable getSourceVariable() { this.definesAt(result, _, _) }
6969

7070
/** Gets the (unique) definition of this SSA variable. */
7171
SsaDefinition getDefinition() { result = this }
@@ -98,7 +98,7 @@ class SsaVariable extends Definition {
9898
}
9999

100100
/** Gets the location of this SSA variable. */
101-
Location getLocation() { result = this.(SsaDefinition).getLocation() }
101+
override Location getLocation() { result = this.(SsaDefinition).getLocation() }
102102

103103
/**
104104
* DEPRECATED: Use `getLocation()` instead.
@@ -124,12 +124,7 @@ class SsaDefinition extends Definition {
124124
SsaVariable getVariable() { result = this }
125125

126126
/** Gets the source variable defined by this definition. */
127-
SsaSourceVariable getSourceVariable() { this.definesAt(result, _, _) }
128-
129-
/**
130-
* Gets the basic block to which this definition belongs.
131-
*/
132-
BasicBlock getBasicBlock() { this.definesAt(_, result, _) }
127+
override SsaSourceVariable getSourceVariable() { this.definesAt(result, _, _) }
133128

134129
/** Gets the innermost function or file to which this SSA definition belongs. */
135130
ControlFlow::Root getRoot() { result = this.getBasicBlock().getScope() }

0 commit comments

Comments
 (0)