Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions shared/controlflow/codeql/controlflow/ControlFlowGraph.qll
Original file line number Diff line number Diff line change
Expand Up @@ -2208,13 +2208,21 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
}
}

module Cfg = BB::Make<Location, BbInput>;
private module Cfg_ = BB::Make<Location, BbInput>;

private module CfgAlias = Cfg;
module Cfg implements BB::CfgSig<Location>, TestCfg::CfgSig<Location> {
import Cfg_

import CfgAlias
class AstNode = Ast::AstNode;

class Callable = Ast::Callable;
}

import Cfg_
}

private import test.TestCfg as TestCfg

private module Additional {
/*
* CFG printing
Expand All @@ -2236,6 +2244,18 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {

import Pp::PrintGraph<Location, PrintGraphInput>

/*
* CFG testing
*/

private module TestInput implements TestCfg::InputSig<AstNode, Callable> {
AstNode getParent(AstNode node) { node = getChild(result, _) }

predicate getEnclosingCallable = Ast::getEnclosingCallable/1;
}

module TestCfgInline = TestCfg::Make<Location, Cfg, TestInput>;

/** Provides a set of consistency queries. */
module Consistency {
/** Holds if the consistency query `query` has `results` results. */
Expand Down
Loading
Loading