<br><br><div class="gmail_quote">On Wed, Mar 11, 2009 at 12:31 PM, Zhongxing Xu <span dir="ltr"><<a href="mailto:xuzhongxing@gmail.com">xuzhongxing@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
This scheme looks great to me! Two points:<br><br>a. Symbolic regions may have types. For example: void foo(char* buf) {...}. 'buf' => SymbolicRegion with type char*<br><br>b. Applying the scheme to your test case:<div class="im">
<br>
<br>// <rdar://problem/6451816><br>
typedef unsigned char Boolean;<br>
typedef const struct __CFNumber * CFNumberRef;<br>
typedef signed long CFIndex;<br>
typedef CFIndex CFNumberType;<br>
typedef unsigned long UInt32;<br>
typedef UInt32 CFStringEncoding;<br>
typedef const struct __CFString * CFStringRef;<br>
extern Boolean CFNumberGetValue(CFNumberRef number, CFNumberType theType, void *valuePtr);<br>
extern CFStringRef CFStringConvertEncodingToIANAC</div><div><div class="im">arSetName(CFStringEncoding encoding);<br>
<br>
CFStringRef rdar_6451816(CFNumberRef nr) {<br>
  CFStringEncoding encoding;<br>
  // &encoding is casted to void*.  This test case tests whether or not<br>
  // we properly invalidate the value of 'encoding'.<br>
  CFNumberGetValue(nr, 9, &encoding);<br>
  return CFStringConvertEncodingToIANACharSetName(encoding); // no-warning<br>
}<br><br></div>We would have to invalidate a TypedViewRegion(void*, VarRegion('encoding')). Then StoreManager should canonicalize it to VarRegion('encoding'). <br>Does that mean we have a new rule for canonicalization of discarding void* typed view besides discarding typedefs? That is, void* typed view is another kind of 'sugar' like typedefs?<br>

</div><div><div></div><div class="h5"><br></div></div></blockquote><div><br>My concern for not having consistent rules is because this. Would we have more rules like this? <br></div></div><br>