From 83adf793e4bca2a0673dd0a50a67c6bd8fda3621 Mon Sep 17 00:00:00 2001 From: Anders Schack-Mulligen Date: Wed, 4 Feb 2026 15:28:37 +0100 Subject: [PATCH] Cfg: Fix compilation. --- shared/controlflow/codeql/controlflow/Cfg.qll | 7 ++++--- shared/controlflow/codeql/controlflow/PrintGraph.qll | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/shared/controlflow/codeql/controlflow/Cfg.qll b/shared/controlflow/codeql/controlflow/Cfg.qll index 6f9a3adfec4..157bf0ffd4f 100644 --- a/shared/controlflow/codeql/controlflow/Cfg.qll +++ b/shared/controlflow/codeql/controlflow/Cfg.qll @@ -1122,6 +1122,9 @@ module MakeWithSplitting< /** Gets the scope of this node. */ CfgScope getScope() { result = getNodeCfgScope(this) } + /** Gets the enclosing callable of this node. */ + CfgScope getEnclosingCallable() { result = this.getScope() } + /** Gets a successor node of a given type, if any. */ Node getASuccessor(SuccessorType t) { result = getASuccessor(this, t) } @@ -1315,9 +1318,7 @@ module MakeWithSplitting< private module PrintGraphInput implements Pp::InputSig { class Callable = CfgScope; - class ControlFlowNode extends Node { - Callable getEnclosingCallable() { result = this.getScope() } - } + class ControlFlowNode = Node; ControlFlowNode getASuccessor(ControlFlowNode n, SuccessorType t) { result = n.getASuccessor(t) diff --git a/shared/controlflow/codeql/controlflow/PrintGraph.qll b/shared/controlflow/codeql/controlflow/PrintGraph.qll index c09aeeff71c..635b671888f 100644 --- a/shared/controlflow/codeql/controlflow/PrintGraph.qll +++ b/shared/controlflow/codeql/controlflow/PrintGraph.qll @@ -102,13 +102,13 @@ module PrintGraph Input> { /** Provides the input to `ViewCfgQuery`. */ signature module ViewCfgQueryInputSig { - /** The source file selected in the IDE. Should be an `external` predicate. */ + /** Gets the source file selected in the IDE. Should be an `external` predicate. */ string selectedSourceFile(); - /** The source line selected in the IDE. Should be an `external` predicate. */ + /** Gets the source line selected in the IDE. Should be an `external` predicate. */ int selectedSourceLine(); - /** The source column selected in the IDE. Should be an `external` predicate. */ + /** Gets the source column selected in the IDE. Should be an `external` predicate. */ int selectedSourceColumn(); /**