clang API Documentation

Functions
clang::ento::bugreporter Namespace Reference

Functions

bool trackNullOrUndefValue (const ExplodedNode *N, const Stmt *S, BugReport &R, bool IsArg=false, bool EnableNullFPSuppression=true)
const ExprgetDerefExpr (const Stmt *S)
const StmtGetDenomExpr (const ExplodedNode *N)
const StmtGetRetValExpr (const ExplodedNode *N)
bool isDeclRefExprToReference (const Expr *E)

Function Documentation

Definition at line 85 of file BugReporterVisitors.cpp.

References clang::ento::ExplodedNode::getLocationAs(), and S.

Definition at line 92 of file BugReporterVisitors.cpp.

References clang::ento::ExplodedNode::getLocationAs(), and S.

Definition at line 36 of file BugReporterVisitors.cpp.

Referenced by getDerefExpr().

bool clang::ento::bugreporter::trackNullOrUndefValue ( const ExplodedNode N,
const Stmt S,
BugReport R,
bool  IsArg = false,
bool  EnableNullFPSuppression = true 
)

Attempts to add visitors to trace a null or undefined value back to its point of origin, whether it is a symbol constrained to null or an explicit assignment.

Parameters:
NA node "downstream" from the evaluation of the statement.
SThe statement whose value is null or undefined.
RThe bug report to which visitors should be attached.
IsArgWhether the statement is an argument to an inlined function. If this is the case, N must be the CallEnter node for the function.
EnableNullFPSuppressionWhether we should employ false positive suppression (inlined defensive checks, returned null).
Returns:
Whether or not the function was able to add visitors for this statement. Note that returning true does not actually imply that any visitors were added.

Definition at line 892 of file BugReporterVisitors.cpp.

References clang::ento::BugReport::addVisitor(), clang::ento::SVal::castAs(), clang::ento::SVal::getAs(), clang::ProgramPoint::getAs(), clang::ento::SVal::getAsLocSymbol(), clang::ento::SVal::getAsRegion(), clang::ento::ExplodedNode::getFirstPred(), clang::ento::ExplodedNode::getLocation(), clang::ento::ExplodedNode::getLocationContext(), getLocationRegionIfReference(), clang::ento::NilReceiverBRVisitor::getNilReceiver(), clang::ento::ExplodedNode::getState(), clang::Expr::IgnoreParenCasts(), clang::ento::CallEvent::isCallStmt(), clang::ento::ExplodedGraph::isInterestingLValueExpr(), clang::ento::BugReport::markInteresting(), P, and peelOffOuterExpr().

Referenced by emitBug(), clang::ento::FindLastStoreBRVisitor::VisitNode(), and clang::ento::NilReceiverBRVisitor::VisitNode().