Lines Matching full:cb

40   static inline const Stmt *getUnreachableStmt(const CFGBlock *CB);
41 static void FindUnreachableEntryPoints(const CFGBlock *CB,
44 static bool isInvalidPath(const CFGBlock *CB, const ParentMap &PM);
45 static inline bool isEmptyCFGBlock(const CFGBlock *CB);
78 const CFGBlock *CB = BE->getBlock();
79 reachable.insert(CB->getBlockID());
95 for (const CFGBlock *CB : *C) {
97 if (reachable.count(CB->getBlockID()))
101 if (isEmptyCFGBlock(CB))
105 if (!visited.count(CB->getBlockID()))
106 FindUnreachableEntryPoints(CB, reachable, visited);
109 if (reachable.count(CB->getBlockID()))
113 if (isInvalidPath(CB, *PM))
120 if (const Stmt *label = CB->getLabel())
127 if (!CB->empty()) {
129 for (CFGBlock::const_iterator ci = CB->begin(), ce = CB->end();
148 if (const Stmt *S = getUnreachableStmt(CB)) {
179 void UnreachableCodeChecker::FindUnreachableEntryPoints(const CFGBlock *CB,
182 visited.insert(CB->getBlockID());
184 for (const CFGBlock *PredBlock : CB->preds()) {
191 reachable.insert(CB->getBlockID());
200 const Stmt *UnreachableCodeChecker::getUnreachableStmt(const CFGBlock *CB) {
201 for (const CFGElement &Elem : *CB) {
207 return CB->getTerminatorStmt();
215 bool UnreachableCodeChecker::isInvalidPath(const CFGBlock *CB,
220 if (CB->pred_size() > 1)
224 if (CB->pred_size() == 0)
227 const CFGBlock *pred = *CB->pred_begin();
247 bool UnreachableCodeChecker::isEmptyCFGBlock(const CFGBlock *CB) {
248 return CB->getLabel() == nullptr // No labels
249 && CB->size() == 0 // No statements
250 && !CB->getTerminatorStmt(); // No terminator