<div style="font-family: arial, helvetica, sans-serif; font-size: 10pt"><div dir="ltr">On Sat, Dec 1, 2012 at 1:09 AM, Peeter Joot <span dir="ltr"><<a href="mailto:peeter.joot@gmail.com" target="_blank">peeter.joot@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">I've answered part of my own question, by grepping the clang source tree for ArrayTypeLoc, and found I can do something like:<div class="im">
<br><br><div> TypeLoc TL = t->getTypeLoc() ;</div><div><br></div></div><div> // don't care if it's an array, just want the basic underlying type of the array.</div>
<div> if ( const ArrayTypeLoc *Arr = dyn_cast<ArrayTypeLoc>(&TL) )</div><div> {</div><div> TL = Arr->getElementLoc() ;</div><div> }</div><div><br></div><div>Am guessing I can probably do something similar to see if the type is a pointer or reference.</div>
<div><br></div><div>Is there any easy way to determine if the underlying type is one of the fundamental types: char, short, int, long (not caring about sign/const/volatile/... variations of these)?</div></blockquote><div>
<br></div><div style>Is you need to drill through the layers until you hit a BuiltinType...</div><div style><br></div><div style>Cheers,</div><div style>/Manuel</div><div style><br></div></div></div></div></div>