Skip to content

Commit ae3a302

Browse files
committed
Ruby: Add getAPrimaryQlClass to CfgNode
1 parent 64206a1 commit ae3a302

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

ruby/ql/lib/codeql/ruby/controlflow/CfgNodes.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ private import internal.Splitting
1111

1212
/** An entry node for a given scope. */
1313
class EntryNode extends CfgNode, TEntryNode {
14-
string getAPrimaryQlClass() { result = "EntryNode" }
14+
override string getAPrimaryQlClass() { result = "EntryNode" }
1515

1616
private CfgScope scope;
1717

@@ -26,7 +26,7 @@ class EntryNode extends CfgNode, TEntryNode {
2626

2727
/** An exit node for a given scope, annotated with the type of exit. */
2828
class AnnotatedExitNode extends CfgNode, TAnnotatedExitNode {
29-
string getAPrimaryQlClass() { result = "AnnotatedExitNode" }
29+
override string getAPrimaryQlClass() { result = "AnnotatedExitNode" }
3030

3131
private CfgScope scope;
3232
private boolean normal;
@@ -53,7 +53,7 @@ class AnnotatedExitNode extends CfgNode, TAnnotatedExitNode {
5353

5454
/** An exit node for a given scope. */
5555
class ExitNode extends CfgNode, TExitNode {
56-
string getAPrimaryQlClass() { result = "ExitNode" }
56+
override string getAPrimaryQlClass() { result = "ExitNode" }
5757

5858
private CfgScope scope;
5959

@@ -73,7 +73,7 @@ class ExitNode extends CfgNode, TExitNode {
7373
*/
7474
class AstCfgNode extends CfgNode, TElementNode {
7575
/** Gets the name of the primary QL class for this node. */
76-
string getAPrimaryQlClass() { result = "AstCfgNode" }
76+
override string getAPrimaryQlClass() { result = "AstCfgNode" }
7777

7878
private Splits splits;
7979
AstNode e;

ruby/ql/lib/codeql/ruby/controlflow/ControlFlowGraph.qll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ class CfgScope extends Scope instanceof CfgScope::Range_ {
2828
* Only nodes that can be reached from an entry point are included in the CFG.
2929
*/
3030
class CfgNode extends TCfgNode {
31+
/** Gets the name of the primary QL class for this node. */
32+
string getAPrimaryQlClass() { none() }
33+
3134
/** Gets a textual representation of this control flow node. */
3235
string toString() { none() }
3336

0 commit comments

Comments
 (0)