<div style="font-family: arial, helvetica, sans-serif; font-size: 10pt">On Mon, Dec 3, 2012 at 6:44 PM, Jordan Rose <span dir="ltr"><<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.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 style="word-wrap:break-word"><br><div><div class="im"><div>On Dec 2, 2012, at 22:40 , Manuel Klimek <<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>> wrote:</div>
<br><blockquote type="cite"><div style="font-family:arial,helvetica,sans-serif;font-size:10pt">On Mon, Dec 3, 2012 at 12:29 AM, Sean Silva <span dir="ltr"><<a href="mailto:silvas@purdue.edu" target="_blank">silvas@purdue.edu</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>> Does clang stores some sort of unique ID for type definitions? I could<br>


> generate manually this id for each time I stumble upon a new QualType but<br>
> I'm looking if this is already made by the library.<br>
<br>
</div>libclang's USR's are probably the closest thing to this, but I don't<br>
think that is what you are looking for.<br></blockquote><div><br></div><div>Inside one TU type pointers have identity - that is, there's only one Type* for the same type. That doesn't hold for QualTypes.</div></div>
</div></div></blockquote><div><br></div></div><div>It doesn't? QualTypes are PointerIntPairs (value objects); two QualTypes should be equal if they have the same qualifiers and the same underlying Type.</div></div></div>
</blockquote><div><br></div><div>That means that QualTypes don't have pointer identity (was all I was trying to say :) - sorry if that was not clear.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div><div><br></div><div>Also, you have to decide if you want to take typedefs into consideration; if not, you should make sure to call getCanonicalType before comparing your QualTypes.</div>
<span class="HOEnZb"><font color="#888888"><div><br></div><div>Jordan</div></font></span></div></div>
</blockquote></div><br></div></div>