Home | History | Annotate | Download | only in Checkers

Lines Matching defs:CB

44   static inline const Stmt *getUnreachableStmt(const CFGBlock *CB);
45 static void FindUnreachableEntryPoints(const CFGBlock *CB,
48 static bool isInvalidPath(const CFGBlock *CB, const ParentMap &PM);
49 static inline bool isEmptyCFGBlock(const CFGBlock *CB);
83 const CFGBlock *CB = BE->getBlock();
84 reachable.insert(CB->getBlockID());
101 const CFGBlock *CB = *I;
103 if (reachable.count(CB->getBlockID()))
107 if (isEmptyCFGBlock(CB))
111 if (!visited.count(CB->getBlockID()))
112 FindUnreachableEntryPoints(CB, reachable, visited);
115 if (reachable.count(CB->getBlockID()))
119 if (CB->size() > 0 && isInvalidPath(CB, *PM))
126 if (const Stmt *label = CB->getLabel())
133 if (!CB->empty()) {
135 for (CFGBlock::const_iterator ci = CB->begin(), ce = CB->end();
153 if (const Stmt *S = getUnreachableStmt(CB)) {
174 void UnreachableCodeChecker::FindUnreachableEntryPoints(const CFGBlock *CB,
177 visited.insert(CB->getBlockID());
179 for (CFGBlock::const_pred_iterator I = CB->pred_begin(), E = CB->pred_end();
187 reachable.insert(CB->getBlockID());
196 const Stmt *UnreachableCodeChecker::getUnreachableStmt(const CFGBlock *CB) {
197 for (CFGBlock::const_iterator I = CB->begin(), E = CB->end(); I != E; ++I) {
201 if (const Stmt *S = CB->getTerminator())
212 bool UnreachableCodeChecker::isInvalidPath(const CFGBlock *CB,
217 if (CB->pred_size() > 1)
221 if (CB->pred_size() == 0)
224 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->getTerminator(); // No terminator