[cfe-commits] r57665 - /cfe/trunk/lib/Analysis/GRExprEngine.cpp

Zhongxing Xu xuzhongxing at gmail.com
Thu Oct 16 19:14:50 PDT 2008

Author: zhongxingxu
Date: Thu Oct 16 21:14:42 2008
New Revision: 57665

URL: http://llvm.org/viewvc/llvm-project?rev=57665&view=rev
Return the corresponding MemRegionVal for both rvalue and lvalue of array of
type T.


Modified: cfe/trunk/lib/Analysis/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/GRExprEngine.cpp?rev=57665&r1=57664&r2=57665&view=diff

--- cfe/trunk/lib/Analysis/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Analysis/GRExprEngine.cpp Thu Oct 16 21:14:42 2008
@@ -806,11 +806,11 @@
     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));

More information about the cfe-commits mailing list