mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
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`.
This commit is contained in:
@@ -34,10 +34,14 @@ class ControlFlowNode extends Locatable, @cfgnode {
|
||||
ControlFlowNode getAPredecessor() { this = result.getASuccessor() }
|
||||
|
||||
/** Gets the function containing this control-flow node. */
|
||||
abstract Function getControlFlowScope();
|
||||
Function getControlFlowScope() {
|
||||
none() // overridden in subclasses
|
||||
}
|
||||
|
||||
/** Gets the smallest statement containing this control-flow node. */
|
||||
abstract Stmt getEnclosingStmt();
|
||||
Stmt getEnclosingStmt() {
|
||||
none() // overridden in subclasses
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if this node is the top-level expression of a conditional statement,
|
||||
|
||||
Reference in New Issue
Block a user