19 using namespace clang;
28 SVal location = state->getLValue(Ex->
getDecl(), baseVal);
32 Bldr.
generateNode(Ex, Pred, state->BindExpr(Ex, LCtx, location));
78 if (
const DeclStmt *DS = dyn_cast<DeclStmt>(elem)) {
79 const VarDecl *elemD = cast<VarDecl>(DS->getSingleDecl());
80 assert(elemD->
getInit() ==
nullptr);
88 evalLocation(dstLocation, S, elem, Pred, state, elementV,
nullptr,
false);
94 NE = dstLocation.
end(); NI!=NE; ++NI) {
109 dyn_cast<TypedValueRegion>(MV->getRegion())) {
118 hasElems = hasElems->bindLoc(elementV, V);
122 noElems = noElems->bindLoc(elementV, nilV);
171 if (Msg->isInstanceMessage()) {
172 SVal recVal = Msg->getReceiverSVal();
180 std::tie(notNilState, nilState) = State->assume(receiverVal);
183 if (nilState && !notNilState) {
188 assert((Pred || HasTag) &&
"Should have cached out already!");
201 if (notNilState != State) {
204 assert((Pred || HasTag) &&
"Should have cached out already!");
225 DE = dstGenericPrevisit.
end(); DI != DE; ++DI) {
230 if (UpdatedMsg->isInstanceMessage()) {
231 SVal recVal = UpdatedMsg->getReceiverSVal();
const Expr * getBase() const
TypedValueRegion - An abstract class representing regions having a typed value.
nonloc::ConcreteInt makeIntVal(const IntegerLiteral *integer)
A (possibly-)qualified type.
This builder class is useful for generating nodes that resulted from visiting a statement.
ProgramPoint getLocation() const
getLocation - Returns the edge associated with the given node.
Manages the lifetime of CallEvent objects.
const Expr * getInit() const
VarDecl - An instance of this class is created to represent a variable declaration or definition...
Defines the Objective-C statement AST node classes.
ImplTy::iterator iterator
void runCheckersForObjCMessageNil(ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const ObjCMethodCall &msg, ExprEngine &Eng)
Run checkers for visiting an obj-c message to nil.
void runCheckersForPostObjCMessage(ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const ObjCMethodCall &msg, ExprEngine &Eng, bool wasInlined=false)
Run checkers for post-visiting obj-c messages.
i32 captured_struct **param SharedsTy A type which contains references the shared variables *param Shareds Context with the list of shared variables from the p *TaskFunction *param Data Additional data for task generation like final * state
static bool isLocType(QualType T)
ExplodedNode * generateSink(const Stmt *S, ExplodedNode *Pred, ProgramStateRef St, const ProgramPointTag *tag=nullptr, ProgramPoint::Kind K=ProgramPoint::PostStmtKind)
void runCheckersForPreCall(ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const CallEvent &Call, ExprEngine &Eng)
Run checkers for pre-visiting obj-c messages.
void runCheckersForPostCall(ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const CallEvent &Call, ExprEngine &Eng, bool wasInlined=false)
Run checkers for post-visiting obj-c messages.
const LocationContext * getLocationContext() const
unsigned blockCount() const
Returns the number of times the current basic block has been visited on the exploded graph path...
CheckerManager & getCheckerManager() const
Loc makeLoc(SymbolRef sym)
void runCheckersForPostStmt(ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const Stmt *S, ExprEngine &Eng, bool wasInlined=false)
Run checkers for post-visiting Stmts.
const ProgramStateRef & getState() const
void VisitLvalObjCIvarRefExpr(const ObjCIvarRefExpr *DR, ExplodedNode *Pred, ExplodedNodeSet &Dst)
Transfer function logic for computing the lvalue of an Objective-C ivar.
void runCheckersForPreObjCMessage(ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const ObjCMethodCall &msg, ExprEngine &Eng)
Run checkers for pre-visiting obj-c messages.
Optional< T > getAs() const
Convert to the specified SVal type, returning None if this SVal is not of the desired type...
Represents Objective-C's @synchronized statement.
An expression that sends a message to the given Objective-C object or class.
CallEventRef< ObjCMethodCall > getObjCMethodCall(const ObjCMessageExpr *E, ProgramStateRef State, const LocationContext *LCtx)
CallEventManager & getCallEventManager()
DeclStmt - Adaptor class for mixing declarations with statements and expressions. ...
SVal - This represents a symbolic expression, which can be either an L-value or an R-value...
void VisitObjCForCollectionStmt(const ObjCForCollectionStmt *S, ExplodedNode *Pred, ExplodedNodeSet &Dst)
VisitObjCForCollectionStmt - Transfer function logic for ObjCForCollectionStmt.
void runCheckersForPreStmt(ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const Stmt *S, ExprEngine &Eng)
Run checkers for pre-visiting Stmts.
const SymbolConjured * conjureSymbol(const Stmt *E, const LocationContext *LCtx, QualType T, unsigned VisitCount, const void *SymbolTag=nullptr)
ProgramStateManager & getStateManager() override
bool isImplicitNoReturn(const ObjCMessageExpr *ME)
Return true if the given message expression is known to never return.
Represents Objective-C's collection statement.
void VisitObjCAtSynchronizedStmt(const ObjCAtSynchronizedStmt *S, ExplodedNode *Pred, ExplodedNodeSet &Dst)
Transfer function logic for ObjCAtSynchronizedStmts.
void VisitObjCMessage(const ObjCMessageExpr *ME, ExplodedNode *Pred, ExplodedNodeSet &Dst)
ObjCIvarRefExpr - A reference to an ObjC instance variable.
void defaultEvalCall(NodeBuilder &B, ExplodedNode *Pred, const CallEvent &Call)
Default implementation of call evaluation.
const ProgramPointTag * getTag() const
CallEventRef< T > cloneWithState(ProgramStateRef State) const
ExplodedNode * generateNode(const Stmt *S, ExplodedNode *Pred, ProgramStateRef St, const ProgramPointTag *tag=nullptr, ProgramPoint::Kind K=ProgramPoint::PostStmtKind)
nonloc::ConcreteInt makeTruthVal(bool b, QualType type)
T castAs() const
Convert to the specified SVal type, asserting that this SVal is of the desired type.