Lines Matching refs: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);
79 const CFGBlock *CB = BE->getBlock();
80 reachable.insert(CB->getBlockID());
97 const CFGBlock *CB = *I;
99 if (reachable.count(CB->getBlockID()))
103 if (isEmptyCFGBlock(CB))
107 if (!visited.count(CB->getBlockID()))
108 FindUnreachableEntryPoints(CB, reachable, visited);
111 if (reachable.count(CB->getBlockID()))
115 if (isInvalidPath(CB, *PM))
122 if (const Stmt *label = CB->getLabel())
129 if (!CB->empty()) {
131 for (CFGBlock::const_iterator ci = CB->begin(), ce = CB->end();
150 if (const Stmt *S = getUnreachableStmt(CB)) {
179 void UnreachableCodeChecker::FindUnreachableEntryPoints(const CFGBlock *CB,
182 visited.insert(CB->getBlockID());
184 for (CFGBlock::const_pred_iterator I = CB->pred_begin(), E = CB->pred_end();
192 reachable.insert(CB->getBlockID());
201 const Stmt *UnreachableCodeChecker::getUnreachableStmt(const CFGBlock *CB) {
202 for (CFGBlock::const_iterator I = CB->begin(), E = CB->end(); I != E; ++I) {
208 if (const Stmt *S = CB->getTerminatorStmt())
219 bool UnreachableCodeChecker::isInvalidPath(const CFGBlock *CB,
224 if (CB->pred_size() > 1)
228 if (CB->pred_size() == 0)
231 const CFGBlock *pred = *CB->pred_begin();
251 bool UnreachableCodeChecker::isEmptyCFGBlock(const CFGBlock *CB) {
252 return CB->getLabel() == nullptr // No labels
253 && CB->size() == 0 // No statements
254 && !CB->getTerminatorStmt(); // No terminator