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.

Ted
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to