27 SVal location = state->getLValue(Ex->
getDecl(), baseVal);
31 Bldr.
generateNode(Ex, Pred, state->BindExpr(Ex, LCtx, location));
51 unsigned NumVisitedCurrent,
62 if (
const auto *R = dyn_cast<TypedValueRegion>(MV->getRegion())) {
78 nextState = nextState->bindLoc(elementV,
V, LCtx);
120 if (
const auto *DS = dyn_cast<DeclStmt>(elem)) {
122 assert(elemD->
getInit() ==
nullptr);
128 bool isContainerNull = state->isNull(collectionV).isConstrainedTrue();
131 evalLocation(DstLocation, S, elem, Pred, state, elementV,
false);
137 if (!isContainerNull)
139 elemRef, elementV, SymMgr,
203 if (Msg->isInstanceMessage()) {
204 SVal recVal = Msg->getReceiverSVal();
212 std::tie(notNilState, nilState) = State->assume(receiverVal);
215 if (nilState && !notNilState) {
221 assert((Pred || HasTag) &&
"Should have cached out already!");
229 for (
auto *I : dstPostCheckers)
230 finishArgumentConstruction(Dst, I, *Msg);
238 if (notNilState != State) {
241 assert((Pred || HasTag) &&
"Should have cached out already!");
259 NodeBuilder Bldr(dstGenericPrevisit, dstEval, *currBldrCtx);
262 DE = dstGenericPrevisit.
end(); DI != DE; ++DI) {
267 if (UpdatedMsg->isInstanceMessage()) {
268 SVal recVal = UpdatedMsg->getReceiverSVal();
270 if (ObjCNoRet.isImplicitNoReturn(ME)) {
280 if (ObjCNoRet.isImplicitNoReturn(ME)) {
293 for (
auto *I : dstEval)
294 finishArgumentConstruction(dstArgCleanup, I, *Msg);
static void populateObjCForDestinationSet(ExplodedNodeSet &dstLocation, SValBuilder &svalBuilder, const ObjCForCollectionStmt *S, ConstCFGElementRef elem, SVal elementV, SymbolManager &SymMgr, unsigned NumVisitedCurrent, NodeBuilder &Bldr, bool hasElements)
Generate a node in Bldr for an iteration statement using ObjC for-loop iterator.
Defines the Objective-C statement AST node classes.
It wraps the AnalysisDeclContext to represent both the call stack with the help of StackFrameContext ...
Represents Objective-C's @synchronized statement.
Represents Objective-C's collection statement.
ObjCIvarRefExpr - A reference to an ObjC instance variable.
const Expr * getBase() const
An expression that sends a message to the given Objective-C object or class.
const ProgramPointTag * getTag() const
A (possibly-)qualified type.
Stmt - This represents one statement.
Represents a variable declaration or definition.
const Expr * getInit() const
Manages the lifetime of CallEvent objects.
CallEventRef< ObjCMethodCall > getObjCMethodCall(const ObjCMessageExpr *E, ProgramStateRef State, const LocationContext *LCtx, CFGBlock::ConstCFGElementRef ElemRef)
CallEventRef< T > cloneWithState(ProgramStateRef State) const
void runCheckersForPreObjCMessage(ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const ObjCMethodCall &msg, ExprEngine &Eng)
Run checkers for pre-visiting obj-c messages.
void runCheckersForPreCall(ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const CallEvent &Call, ExprEngine &Eng)
Run checkers for pre-visiting obj-c messages.
void runCheckersForPostObjCMessage(ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const ObjCMethodCall &msg, ExprEngine &Eng, bool wasInlined=false)
Run checkers for post-visiting obj-c messages.
void runCheckersForPostStmt(ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const Stmt *S, ExprEngine &Eng, bool wasInlined=false)
Run checkers for post-visiting Stmts.
void runCheckersForPreStmt(ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const Stmt *S, ExprEngine &Eng)
Run checkers for pre-visiting Stmts.
void runCheckersForObjCMessageNil(ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const ObjCMethodCall &msg, ExprEngine &Eng)
Run checkers for visiting an obj-c message to nil.
void runCheckersForPostCall(ExplodedNodeSet &Dst, const ExplodedNodeSet &Src, const CallEvent &Call, ExprEngine &Eng, bool wasInlined=false)
Run checkers for post-visiting obj-c messages.
ImplTy::iterator iterator
const ProgramStateRef & getState() const
ProgramPoint getLocation() const
getLocation - Returns the edge associated with the given node.
const LocationContext * getLocationContext() const
ProgramStateManager & getStateManager()
void VisitObjCMessage(const ObjCMessageExpr *ME, ExplodedNode *Pred, ExplodedNodeSet &Dst)
void VisitObjCAtSynchronizedStmt(const ObjCAtSynchronizedStmt *S, ExplodedNode *Pred, ExplodedNodeSet &Dst)
Transfer function logic for ObjCAtSynchronizedStmts.
void VisitObjCForCollectionStmt(const ObjCForCollectionStmt *S, ExplodedNode *Pred, ExplodedNodeSet &Dst)
VisitObjCForCollectionStmt - Transfer function logic for ObjCForCollectionStmt.
void VisitLvalObjCIvarRefExpr(const ObjCIvarRefExpr *DR, ExplodedNode *Pred, ExplodedNodeSet &Dst)
Transfer function logic for computing the lvalue of an Objective-C ivar.
ConstCFGElementRef getCFGElementRef() const
CheckerManager & getCheckerManager() const
unsigned getNumVisitedCurrent() const
void defaultEvalCall(NodeBuilder &B, ExplodedNode *Pred, const CallEvent &Call, const EvalCallOptions &CallOpts={})
Default implementation of call evaluation.
static ProgramStateRef setWhetherHasMoreIteration(ProgramStateRef State, const ObjCForCollectionStmt *O, const LocationContext *LC, bool HasMoreIteraton)
Note whether this loop has any more iterations to model. These methods.
static bool isLocType(QualType T)
This is the simplest builder which generates nodes in the ExplodedGraph.
ExplodedNode * generateNode(const ProgramPoint &PP, ProgramStateRef State, ExplodedNode *Pred, bool MarkAsSink=false)
Generates a node in the ExplodedGraph.
ExplodedNode * generateSink(const ProgramPoint &PP, ProgramStateRef State, ExplodedNode *Pred)
Generates a sink in the ExplodedGraph.
CallEventManager & getCallEventManager()
nonloc::ConcreteInt makeIntVal(const IntegerLiteral *integer)
loc::MemRegionVal makeLoc(SymbolRef sym)
SVal - This represents a symbolic expression, which can be either an L-value or an R-value.
std::optional< T > getAs() const
Convert to the specified SVal type, returning std::nullopt if this SVal is not of the desired type.
T castAs() const
Convert to the specified SVal type, asserting that this SVal is of the desired type.
const SymbolConjured * conjureSymbol(ConstCFGElementRef Elem, const LocationContext *LCtx, QualType T, unsigned VisitCount, const void *SymbolTag=nullptr)
IntrusiveRefCntPtr< const ProgramState > ProgramStateRef
const SymExpr * SymbolRef
The JSON file list parser is used to communicate input to InstallAPI.
CFGBlock::ConstCFGElementRef ConstCFGElementRef
U cast(CodeGen::Address addr)