mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
Merge ControlFlowTreeBase and AstNode
This commit is contained in:
@@ -7,8 +7,8 @@ private import codeql.util.Location
|
||||
|
||||
/** Provides the language-specific input specification. */
|
||||
signature module InputSig<LocationSig Location> {
|
||||
/** The base class for `ControlFlowTree`. */
|
||||
class ControlFlowTreeBase {
|
||||
/** An AST node. */
|
||||
class AstNode {
|
||||
/** Gets a textual representation of this element. */
|
||||
string toString();
|
||||
|
||||
@@ -16,9 +16,6 @@ signature module InputSig<LocationSig Location> {
|
||||
Location getLocation();
|
||||
}
|
||||
|
||||
/** An AST node. */
|
||||
class AstNode extends ControlFlowTreeBase;
|
||||
|
||||
/** A control-flow completion. */
|
||||
class Completion {
|
||||
/** Gets a textual representation of this completion. */
|
||||
@@ -127,10 +124,10 @@ signature module InputSig<LocationSig Location> {
|
||||
module Make<LocationSig Location, InputSig<Location> Input> {
|
||||
private import Input
|
||||
|
||||
final private class ControlFlowTreeBaseFinal = ControlFlowTreeBase;
|
||||
final private class AstNodeFinal = AstNode;
|
||||
|
||||
/** An element with associated control flow. */
|
||||
abstract class ControlFlowTree extends ControlFlowTreeBaseFinal {
|
||||
abstract class ControlFlowTree extends AstNodeFinal {
|
||||
/** Holds if `first` is the first element executed within this element. */
|
||||
pragma[nomagic]
|
||||
abstract predicate first(AstNode first);
|
||||
@@ -809,8 +806,6 @@ module Make<LocationSig Location, InputSig<Location> Input> {
|
||||
private predicate splitsBlockContains(AstNode start, AstNode n) =
|
||||
fastTC(intraSplitsSucc/2)(start, n)
|
||||
|
||||
final private class AstNodeFinal = AstNode;
|
||||
|
||||
/**
|
||||
* A block of control flow elements where the set of splits is guaranteed
|
||||
* to remain unchanged, represented by the first element in the block.
|
||||
|
||||
Reference in New Issue
Block a user