<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Dec 3, 2012, at 9:46 , Manuel Klimek <<a href="mailto:klimek@google.com">klimek@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><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></div></blockquote><br></div><div>Ah, okay. I thought you meant you can't compare them with == and get a meaningful result, which you can. (Of course, usually I shoot my self in the foot by forgetting the canonicalization in cases where it's needed...)</div><br></body></html>