Skip to content

Commit 2ac6467

Browse files
committed
Merge ControlFlowTreeBase and AstNode
1 parent 525ed65 commit 2ac6467

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

ruby/ql/lib/codeql/ruby/controlflow/internal/ControlFlowGraphImpl.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@ private module CfgInput implements CfgShared::InputSig<Location> {
2525
private import Splitting as Splitting
2626
private import codeql.ruby.CFG as Cfg
2727

28-
class ControlFlowTreeBase = Impl::AstNode;
29-
30-
class AstNode = ControlFlowTreeBase;
28+
class AstNode = Impl::AstNode;
3129

3230
class Completion = Comp::Completion;
3331

shared/controlflow/codeql/controlflow/Cfg.qll

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,15 @@ private import codeql.util.Location
77

88
/** Provides the language-specific input specification. */
99
signature module InputSig<LocationSig Location> {
10-
/** The base class for `ControlFlowTree`. */
11-
class ControlFlowTreeBase {
10+
/** An AST node. */
11+
class AstNode {
1212
/** Gets a textual representation of this element. */
1313
string toString();
1414

1515
/** Gets the location of this element. */
1616
Location getLocation();
1717
}
1818

19-
/** An AST node. */
20-
class AstNode extends ControlFlowTreeBase;
21-
2219
/** A control-flow completion. */
2320
class Completion {
2421
/** Gets a textual representation of this completion. */
@@ -127,10 +124,10 @@ signature module InputSig<LocationSig Location> {
127124
module Make<LocationSig Location, InputSig<Location> Input> {
128125
private import Input
129126

130-
final private class ControlFlowTreeBaseFinal = ControlFlowTreeBase;
127+
final private class AstNodeFinal = AstNode;
131128

132129
/** An element with associated control flow. */
133-
abstract class ControlFlowTree extends ControlFlowTreeBaseFinal {
130+
abstract class ControlFlowTree extends AstNodeFinal {
134131
/** Holds if `first` is the first element executed within this element. */
135132
pragma[nomagic]
136133
abstract predicate first(AstNode first);
@@ -809,8 +806,6 @@ module Make<LocationSig Location, InputSig<Location> Input> {
809806
private predicate splitsBlockContains(AstNode start, AstNode n) =
810807
fastTC(intraSplitsSucc/2)(start, n)
811808

812-
final private class AstNodeFinal = AstNode;
813-
814809
/**
815810
* A block of control flow elements where the set of splits is guaranteed
816811
* to remain unchanged, represented by the first element in the block.

0 commit comments

Comments
 (0)