Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1ed4a48

Browse files
committed
C++: Make ControlFlowNode's predicates concrete
The presence of abstract predicates on this class made it hard to specialize it, and this is one of the reasons why the raw db-type `@cfgnode` is often used in preference to `ControlFlowNode`.
1 parent ea9bff0 commit 1ed4a48

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

cpp/ql/src/semmle/code/cpp/controlflow/ControlFlowGraph.qll

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,14 @@ class ControlFlowNode extends Locatable, @cfgnode {
3434
ControlFlowNode getAPredecessor() { this = result.getASuccessor() }
3535

3636
/** Gets the function containing this control-flow node. */
37-
abstract Function getControlFlowScope();
37+
Function getControlFlowScope() {
38+
none() // overridden in subclasses
39+
}
3840

3941
/** Gets the smallest statement containing this control-flow node. */
40-
abstract Stmt getEnclosingStmt();
42+
Stmt getEnclosingStmt() {
43+
none() // overridden in subclasses
44+
}
4145

4246
/**
4347
* Holds if this node is the top-level expression of a conditional statement,

0 commit comments

Comments
 (0)