<div dir="ltr"><div>If I have code like this:</div><div><br></div><div>typedef int X;</div><div>typedef X Y;</div><div>typedef Y Z;</div><div><br></div><div>Z i = 0;</div><div><br></div><div>I have the QualType for i.  getAsString() returns "Z".  getCanonicalType().getAsString() returns "int".</div><div><br></div><div>Is there some way to trace the typedef chain such that I get "Z", "Y", "X", and "int"?  Order is not particularly important to me, but it would be nice to get them in that order.</div></div>