@Test public void test_empty_block_removal() { ControlFlowGraph cfg = cfgForBlock("" + "if (a) {" + " bar();" + " if (b) {" + " qix();" + " }" + "}"); assertThat(cfg.end().predecessors()).hasSize(3); }
public CfgBlock end() { return end; }
ControlFlowGraph { public CfgBlock end() { return end; } }
ControlFlowGraph { public CfgBlock end() { return end; } ControlFlowGraph(ImmutableSet<CfgBlock> blocks, CfgBlock start, PhpCfgEndBlock end); }
ControlFlowGraph { public CfgBlock end() { return end; } ControlFlowGraph(ImmutableSet<CfgBlock> blocks, CfgBlock start, PhpCfgEndBlock end); @VisibleForTesting static ControlFlowGraph build(BlockTree body); @CheckForNull static ControlFlowGraph build(Tree tree, CheckContext context); CfgBlock start(); CfgBlock end(); Set<CfgBlock> blocks(); }
ControlFlowGraph { public CfgBlock end() { return end; } ControlFlowGraph(ImmutableSet<CfgBlock> blocks, CfgBlock start, PhpCfgEndBlock end); @VisibleForTesting static ControlFlowGraph build(BlockTree body); @CheckForNull static ControlFlowGraph build(Tree tree, CheckContext context); CfgBlock start(); CfgBlock end(); Set<CfgBlock> blocks(); static final Set<Tree.Kind> KINDS_WITH_CONTROL_FLOW; }