On Dec 16, 2009, at 8:30 PM, Ted Kremenek wrote: > > On Dec 16, 2009, at 5:47 PM, Zhongxing Xu wrote: > >> 2009/12/17 Ted Kremenek <[email protected]>: >>> Hi Zhongxing, >>> >>> How do we plan on using CXXObjectRegion? >>> >>> For stack allocated objects, we will use VarRegions. For heap allocated >>> (e.g., 'new'), we will use SymbolicRegions. For fields that are C++ >>> objects we will use FieldRegions. >>> >> >> My feeling is that c++ objects may have some properties that justify >> it to be a separate region, like the vtable pointer. But apparently we >> haven't got there. > > If we wanted to represent the vtable pointer we have a variety of options, > like having something similar to FieldRegion, e.g., VTablePtrRegion, that > allows us to attach the vtable pointer as a "property" of another region. > That way a VarRegion could represent a stack allocated object, a > SymbolicRegion an objected created using 'new', etc.
One other aspect that might impact the design is that the vtable pointer changes during object construction and destruction. This makes it very much like a field of an object, not a property of the object as a whole. -Chris _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
