<div dir="ltr">On Mon, Aug 12, 2013 at 7:39 PM, Richard <span dir="ltr"><<a href="mailto:legalize@xmission.com" target="_blank">legalize@xmission.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Suppose I have the following code, patterned after remove-cstr-calls:<br>


<br>
Finder.addMatcher(classTemplateSpecializationDecl().bind("ts"), &Callback);<br>
<br>
Inside the Callback, I want to do something like:<br>
<br>
if (ClassTemplateSpecializationDecl const *const TemplateSpecialization<br>
        = Nodes.getNodeAs<ClassTemplateSpecializationDecl>("ts")) {<br>
        // obtain text of template specialization<br>
}<br>
<br>
I can find out if this is an explicit instantiation or specialization<br>
and I can get the template arguments with getTemplateArgs(), but I<br>
can't seem to find accessors for the source location around the<br>
template argument.<br>
<br>
It seems silly for me to have to scrape out the template argument from<br>
the whole specialization with ad-hoc string searches.  I'm thinking<br>
there's a better way that I'm missing.<br>
<br>
Suggestions?<br></blockquote><div><br></div><div>Does</div><div>getTypeAsWritten()->getTypeLoc() give you a TemplateSpecializationTypeLoc?</div><div><br></div><div>Cheers,</div><div>/Manuel</div><div><br></div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span><font color="#888888">--<br>
"The Direct3D Graphics Pipeline" free book <<a href="http://tinyurl.com/d3d-pipeline" target="_blank">http://tinyurl.com/d3d-pipeline</a>><br>
     The Computer Graphics Museum <<a href="http://computergraphicsmuseum.org" target="_blank">http://computergraphicsmuseum.org</a>><br>
         The Terminals Wiki <<a href="http://terminals.classiccmp.org" target="_blank">http://terminals.classiccmp.org</a>><br>
  Legalize Adulthood! (my blog) <<a href="http://legalizeadulthood.wordpress.com" target="_blank">http://legalizeadulthood.wordpress.com</a>><br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</font></span></blockquote></div><br></div></div>