I've answered part of my own question, by grepping the clang source tree for ArrayTypeLoc, and found I can do something like:<br><br><div>      TypeLoc TL = t->getTypeLoc() ;</div><div><br></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><div class="gmail_extra">
<div class="gmail_quote"><div> </div><div>-- <br></div></div>Peeter<br>
</div>