>
>
>
> ==============================================================================
> --- cfe/trunk/lib/Analysis/MemRegion.cpp (original)
> +++ cfe/trunk/lib/Analysis/MemRegion.cpp Thu Jan 29 18:08:43 2009
> @@ -114,8 +114,9 @@
>   if (ArrayType* AT = dyn_cast<ArrayType>(T.getTypePtr()))
>     return AT->getElementType();
>
> -  PointerType* PtrT = cast<PointerType>(T.getTypePtr());
> -  return C.getCanonicalType(PtrT->getPointeeType());
> +  // If the RValueType of the array region isn't an ArrayType, then
> essentially
> +  // the element's
> +  return T;
>  }
>

Hi Ted,

This perhaps does not work for code like:

char* p = (char*) alloca(4);
char* c = p[1];

The array region of element region p[1] is an AnonTypedRegion, whose type is
'pointer to char'.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to