<div dir="ltr">On Mon, Jun 10, 2013 at 6:03 PM, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com" target="_blank">eli.friedman@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div class="im">On Mon, Jun 10, 2013 at 8:39 AM, Manuel Klimek <span dir="ltr"><<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>On Fri, Jun 7, 2013 at 10:31 PM, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com" target="_blank">eli.friedman@gmail.com</a>></span> wrote:<br>

</div><div class="gmail_extra"><div class="gmail_quote"><div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Author: efriedma<br>
Date: Fri Jun  7 15:31:48 2013<br>
New Revision: 183563<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=183563&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=183563&view=rev</a><br>
Log:<br>
Re-commit r183466 with a fix to make the TypeLoc casting machinery work<br>
correctly in the presence of qualified types.<br>
<br>
(I had to change the unittest because it was trying to cast a<br>
QualifiedTypeLoc to TemplateSpecializationTypeLoc.)<br></blockquote><div><br></div></div><div>That did work before though... Why doesn't that work any more?</div></div></div></div></blockquote></div><div><br>It essentially worked by accident: pretty much all the TypeLoc subclass inherit from UnqualTypeLoc, but they were forgetting to check that the TypeLoc was actually unqualified.<br>

<br></div><div>If it's useful functionality, I guess I could modify the casting routines to implicitly strip qualifiers where appropriate.</div></div></div></div></blockquote><div><br></div><div style>Ha, I didn't even know that there was a QualifiedTypeLoc (I'd have expected it to be called QualTypeLoc :P)</div>
<div style>At least now I learned how I get to the qualifier location on type locations :)</div><div style><br></div><div style>I'm not sure how often people already rely on the castAs working through the boundaries. I think it's unfortunate enough that types have their own casting mechanism.</div>
<div style><br></div><div style>Thanks for the info.</div><div style>/Manuel</div></div></div></div>