<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 2, 2012, at 22:40 , 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 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 class="im">> 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>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><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><div><br></div><div>Jordan</div></div></body></html>