[cfe-commits] r57664 - /cfe/trunk/lib/Analysis/BasicStore.cpp

Zhongxing Xu xuzhongxing at gmail.com
Thu Oct 16 18:51:28 PDT 2008


Author: zhongxingxu
Date: Thu Oct 16 20:51:27 2008
New Revision: 57664

URL: http://llvm.org/viewvc/llvm-project?rev=57664&view=rev
Log:
Array and struct variables do have lvalue. For example,
struct s {};
void f() {
  int a[10];
  int (*p)[10];
  p = &a;
  (*p)[3] =1;

  struct s d;
  struct s *q;
  q = &d;
}

We return the corresponding MemRegionVal for them.

Modified:
    cfe/trunk/lib/Analysis/BasicStore.cpp

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

==============================================================================
--- cfe/trunk/lib/Analysis/BasicStore.cpp (original)
+++ cfe/trunk/lib/Analysis/BasicStore.cpp Thu Oct 16 20:51:27 2008
@@ -79,8 +79,6 @@
   return new BasicStoreManager(StMgr);
 }
 RVal BasicStoreManager::getLValueVar(const GRState* St, const VarDecl* VD) {
-  QualType T = VD->getType();
-  assert(!T->isArrayType() && "Array and struct variable have no lvalue.");
   return lval::MemRegionVal(MRMgr.getVarRegion(VD));
 }
   





More information about the cfe-commits mailing list