[cfe-commits] r61418 - /cfe/trunk/lib/Analysis/RegionStore.cpp
Zhongxing Xu
xuzhongxing at gmail.com
Tue Dec 23 23:29:26 PST 2008
Author: zhongxingxu
Date: Wed Dec 24 01:29:24 2008
New Revision: 61418
URL: http://llvm.org/viewvc/llvm-project?rev=61418&view=rev
Log:
set region default value if there are not enough init values for array and struct.
Modified:
cfe/trunk/lib/Analysis/RegionStore.cpp
Modified: cfe/trunk/lib/Analysis/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/RegionStore.cpp?rev=61418&r1=61417&r2=61418&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/RegionStore.cpp (original)
+++ cfe/trunk/lib/Analysis/RegionStore.cpp Wed Dec 24 01:29:24 2008
@@ -765,8 +765,8 @@
// When we are binding the whole array, it always has default value 0.
GRStateRef state(St, StateMgr);
- // St = state.set<RegionDefaultValue>(R, NonLoc::MakeVal(getBasicVals(), 0,
- // false));
+ St = state.set<RegionDefaultValue>(R, NonLoc::MakeVal(getBasicVals(), 0,
+ false));
Store store = St->getStore();
@@ -841,9 +841,9 @@
// There may be fewer values than fields only when we are initializing a
// struct decl. In this case, mark the region as having default value.
if (VI == VE) {
- // GRStateRef state(St, StateMgr);
- //St = state.set<RegionDefaultValue>(R, NonLoc::MakeVal(getBasicVals(), 0,
- // false));
+ GRStateRef state(St, StateMgr);
+ St = state.set<RegionDefaultValue>(R, NonLoc::MakeVal(getBasicVals(), 0,
+ false));
break;
}
More information about the cfe-commits
mailing list