diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-10-23 03:10:39 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-10-23 03:10:39 +0000 |
commit | e1911afd2a79cb508bc81b30be49a0c8648a81b0 (patch) | |
tree | 1883de3eb6a8c524bf83c22c415b7f30fc24365c /lib/Analysis/GRExprEngine.cpp | |
parent | 4d8e5b803ecb0b891879aa64a09491b5824a5364 (diff) |
Let StoreManager do different cast on arrays. BasicStore will just keep it intact.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58028 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/GRExprEngine.cpp')
-rw-r--r-- | lib/Analysis/GRExprEngine.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
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()))); } } |