diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-10-17 02:14:42 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-10-17 02:14:42 +0000 |
commit | ab9f1a2ab9a25c63538d8080fe5ed6be299cca2a (patch) | |
tree | 2d5b73b458fbf4069e1889660c0b5b9f750d2952 /lib/Analysis/GRExprEngine.cpp | |
parent | cb3a795d9d69b24af77588e66a02c3d3d5b3dd8f (diff) |
Return the corresponding MemRegionVal for both rvalue and lvalue of array of
type T.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57665 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/GRExprEngine.cpp')
-rw-r--r-- | lib/Analysis/GRExprEngine.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp index 1c0773a89c..76d89bb3b1 100644 --- a/lib/Analysis/GRExprEngine.cpp +++ b/lib/Analysis/GRExprEngine.cpp @@ -806,11 +806,11 @@ void GRExprEngine::VisitDeclRefExpr(DeclRefExpr* Ex, NodeTy* Pred, NodeSet& Dst, QualType T = VD->getType(); if (T->isArrayType()) { - assert(!asLValue && "Array variable has no lvalue."); - - // C++ standard says array value should be implicitly converted to pointer - // in some cases. We don't have such context information right now. We - // use a MemRegionVal to represent this. May be changed in the future. + // C++ standard says array of type T should be implicitly converted to + // pointer to type T in some cases. Currently we don't do this cast in + // VisitCast(), because BasicStore is not field sensitive. We shall do + // this in a transfer function in the future. We represent both lvalue and + // rvalue of array of type T as the corresponding MemRegionVal of it. RVal V = lval::MemRegionVal(StateMgr.getRegion(VD)); MakeNode(Dst, Ex, Pred, SetRVal(St, Ex, V)); |