return SetSVal(St, Ex, V, isBlkExpr, Invalidate);
}
+
+ SVal ArrayToPointer(SVal Array) {
+ return StoreMgr->ArrayToPointer(Array);
+ }
// Methods that manipulate the GDM.
const GRState* addGDM(const GRState* St, void* Key, void* Data);
virtual SVal getLValueElement(const GRState* St,
SVal Base, SVal Offset) = 0;
+ virtual SVal ArrayToPointer(SVal Array) = 0;
virtual Store
RemoveDeadBindings(Store store, Stmt* Loc, const LiveVariables& Live,
SVal getLValueIvar(const GRState* St, const ObjCIvarDecl* D, SVal Base);
SVal getLValueField(const GRState* St, SVal Base, const FieldDecl* D);
SVal getLValueElement(const GRState* St, SVal Base, SVal Offset);
+
+ SVal ArrayToPointer(SVal Array) { return Array; }
virtual Store
RemoveDeadBindings(Store store, Stmt* Loc, const LiveVariables& Live,
MakeNode(Dst, CastE, N, SetSVal(St, CastE, V));
continue;
}
-
+
+ // StoreManager casts array to different values.
+ if (ExTy->isArrayType()) {
+ V = StateMgr.ArrayToPointer(V);
+ MakeNode(Dst, CastE, N, SetSVal(St, CastE, V));
+ continue;
+ }
+
// All other cases.
-
MakeNode(Dst, CastE, N, SetSVal(St, CastE, EvalCast(V, CastE->getType())));
}
}