void MyChecker::checkPreStmt(const CallExpr *CE, CheckerContext &C) const { ExplodedNode *N = C.generateNode(); // Do stuff with the new node... }
void MyChecker::checkPostStmt(const DeclRefExpr *DRE, CheckerContext &C) const { ExplodedNode *N = C.generateNode(); C.addTransition(N); }In this example, the checkPostStmt method is called after every statement that refers to a named variable. The method generates a new ExplodedNode and adds it to the program's ExplodedGraph using the addTransition method. It is difficult to determine which package or library these examples are part of without more information. Clang Static Analyzer is a key component of the LLVM compiler infrastructure, but it could also be used with other libraries or frameworks.