<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 31, 2011, at 3:07 PM, Alex Miller wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">Patch looks good. Could you provide a test case that we can integrate into Clang's test suite, e.g., that extends test/SemaCXX/new-delete.cpp?</div>
</blockquote><div><br></div><div>Done. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
> If someone could point out how to turn the QualType instance representing 'Foo *' into just 'Foo', I'd appreciate it.<br>
<br>
<br>
</div>Isn't PointeeElem the type you want to print?<br>
<br>
In any case, if you want to dig out the type that a QualType T points to, use something like<br>
<br>
        if (const PointerType *PointerT = T->getAs<PointerType>()) {<br>
                // PointerT->getPointeeType() is the type that T points to<br>
        }<br></blockquote><div><br></div><div>Thanks for pointing out that PointeeElem already held the right type. Fixed.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
Could you re-submit the patch with those tweaks? Thanks for working on this!<br>
<br>
        - Doug</blockquote></div><br><div>Attached and no problem! :)</div></blockquote><div><br></div>Committed as r124663 with some minor tweaks (i.e., this found some latent bugs in the test suite). Thanks!</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">      </span>- Doug</div><div><br></div><div><br></div></body></html>