set region default value if there are not enough init values for array and struct.

llvm-svn: 61418
This commit is contained in:
Zhongxing Xu 2008-12-24 07:29:24 +00:00
parent be2d5535f6
commit c7a2792817
1 changed files with 5 additions and 5 deletions

View File

@ -765,8 +765,8 @@ const GRState* RegionStoreManager::BindArray(const GRState* St,
// 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 @@ RegionStoreManager::BindStruct(const GRState* St, const TypedRegion* R, SVal V){
// 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;
}