Skip to content

Commit aaa4361

Browse files
committed
Rearrange member predicates in ControlFlow::Node
Put all the ones which might need to be overrridden by subclasses together for ease of reading.
1 parent 79f4f78 commit aaa4361

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

java/ql/lib/semmle/code/java/ControlFlowGraph.qll

+15-15
Original file line numberDiff line numberDiff line change
@@ -104,21 +104,6 @@ module ControlFlow {
104104

105105
/** A node in the expression-level control-flow graph. */
106106
class Node extends TNode {
107-
/** Gets the statement containing this node, if any. */
108-
Stmt getEnclosingStmt() { none() }
109-
110-
/** Gets the immediately enclosing callable whose body contains this node. */
111-
Callable getEnclosingCallable() { none() }
112-
113-
/** Gets the statement this `Node` corresponds to, if any. */
114-
Stmt asStmt() { none() }
115-
116-
/** Gets the expression this `Node` corresponds to, if any. */
117-
Expr asExpr() { none() }
118-
119-
/** Gets the call this `Node` corresponds to, if any. */
120-
Call asCall() { none() }
121-
122107
/** Gets an immediate successor of this node. */
123108
Node getASuccessor() { result = succ(this) }
124109

@@ -137,6 +122,21 @@ module ControlFlow {
137122
/** Gets the basic block that contains this node. */
138123
BasicBlock getBasicBlock() { result.getANode() = this }
139124

125+
/** Gets the statement containing this node, if any. */
126+
Stmt getEnclosingStmt() { none() }
127+
128+
/** Gets the immediately enclosing callable whose body contains this node. */
129+
Callable getEnclosingCallable() { none() }
130+
131+
/** Gets the statement this `Node` corresponds to, if any. */
132+
Stmt asStmt() { none() }
133+
134+
/** Gets the expression this `Node` corresponds to, if any. */
135+
Expr asExpr() { none() }
136+
137+
/** Gets the call this `Node` corresponds to, if any. */
138+
Call asCall() { none() }
139+
140140
/** Gets a textual representation of this element. */
141141
string toString() { none() }
142142

0 commit comments

Comments
 (0)