aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/BasicStore.cpp2
-rw-r--r--lib/Analysis/GRExprEngine.cpp10
2 files changed, 10 insertions, 2 deletions
diff --git a/lib/Analysis/BasicStore.cpp b/lib/Analysis/BasicStore.cpp
index cdecb19319..70631ac5bf 100644
--- a/lib/Analysis/BasicStore.cpp
+++ b/lib/Analysis/BasicStore.cpp
@@ -51,6 +51,8 @@ public:
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,
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp
index ae474bef61..4d771fb366 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/lib/Analysis/GRExprEngine.cpp
@@ -1503,9 +1503,15 @@ void GRExprEngine::VisitCast(Expr* CastE, Expr* Ex, NodeTy* Pred, NodeSet& Dst){
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())));
}
}