On Sun, Oct 26, 2008 at 3:47 AM, Ted Kremenek <[EMAIL PROTECTED]> wrote:

>
> On Oct 25, 2008, at 7:13 AM, Zhongxing Xu wrote:
>
>  /// AnonTypedRegion - An "anonymous" region that simply types a chunk
>> ///  of memory.
>> class AnonTypedRegion : public TypedRegion {
>> @@ -195,6 +227,11 @@
>> public:
>>  const Decl* getDecl() const { return D; }
>>  void Profile(llvm::FoldingSetNodeID& ID) const;
>> +
>> +  static bool classof(const MemRegion* R) {
>> +    unsigned k = R->getKind();
>> +    return k > BEG_DECL_REGIONS && k < END_DECL_REGIONS;
>> +  }
>> };
>>
>
> Hi Zhongxing,
>
> Can you tell me what your motivation was for implementing 'classof' for
> AnonTypedRegion in this way?  This will return true if the MemRegion is a
> VarRegion or a FieldRegion, but not if it is an instance of AnonTypedRegion
> (!).  AnonTypedRegion is just meant to be some lightweight layering on top
> of an existing region where we want to add some typing information to a set
> of bytes.
>

Hi Ted,

This is not the classof implementation of AnonTypedRegion, but of
DeclRegion. It looks confusing in the patch. Please look at the updated
MemRegion.h.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to