21 #include "llvm/Support/raw_ostream.h"
23 using namespace clang;
27 class TraversalDumper :
public Checker< check::BranchCondition,
28 check::EndFunction > {
35 void TraversalDumper::checkBranchCondition(
const Stmt *Condition,
50 << Parent->getStmtClassName() <<
"\n";
54 llvm::outs() <<
"--END FUNCTION--\n";
64 class CallDumper :
public Checker< check::PreCall,
73 unsigned Indentation = 0;
81 llvm::outs().indent(Indentation);
82 Call.
dump(llvm::outs());
90 unsigned Indentation = 0;
98 llvm::outs().indent(Indentation);
100 llvm::outs() <<
"Returning void\n";
102 llvm::outs() <<
"Returning " << C.
getSVal(CallE) <<
"\n";
unsigned getSpellingLineNumber(SourceLocation Loc, bool *Invalid=nullptr) const
Defines the Objective-C statement AST node classes.
const Expr * getOriginExpr() const
Returns the expression whose value will be the result of this call. May be null.
ParentMap & getParentMap() const
void dump(raw_ostream &Out) const
CHECKER * registerChecker()
Used to register checkers.
Stmt * getParent(Stmt *) const
Encodes a location in the source. The SourceManager can decode this to get at the full include stack...
const LocationContext * getParent() const
Represents an abstract call to a function or method along a particular path.
QualType getResultType() const
Returns the result type, adjusted for references.
Represents Objective-C's collection statement.
SourceManager & getSourceManager()
const LocationContext * getLocationContext() const
SVal getSVal(const Stmt *S) const
Get the value of arbitrary expressions at this point in the path.