virtual bool visit(const WorkListUnit &U) { ProgramPoint P = U.getNode()->getLocation(); const CFGBlock *B = 0; if (Optional<StmtPoint> SP = P.getAs<StmtPoint>()) { B = CBM->getBlock(SP->getStmt()); } else if (Optional<BlockEdge> BE = P.getAs<BlockEdge>()) { B = BE->getDst(); } else if (Optional<BlockEntrance> BEnt = P.getAs<BlockEntrance>()) { B = BEnt->getBlock(); } else if (Optional<BlockExit> BExit = P.getAs<BlockExit>()) { B = BExit->getBlock(); } if (!B) return true; return B == TargetBlock || CRA.isReachable(B, TargetBlock); }
virtual bool visit(const WorkListUnit &U) { ProgramPoint P = U.getNode()->getLocation(); const CFGBlock *B = 0; if (StmtPoint *SP = dyn_cast<StmtPoint>(&P)) { B = CBM->getBlock(SP->getStmt()); } else if (BlockEdge *BE = dyn_cast<BlockEdge>(&P)) { B = BE->getDst(); } else if (BlockEntrance *BEnt = dyn_cast<BlockEntrance>(&P)) { B = BEnt->getBlock(); } else if (BlockExit *BExit = dyn_cast<BlockExit>(&P)) { B = BExit->getBlock(); } if (!B) return true; return B == TargetBlock || CRA.isReachable(B, TargetBlock); }