<div dir="ltr">Yes, this is what I have to do.<div><br></div><div>Actually RecursiveASTVisitor does not enforce constness, so probably it is AST matchers that are not consistent with rest of Clang API. </div><div><br></div><div>-Roman</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-10-03 12:49 GMT-07:00 Jonas Toth <span dir="ltr"><<a href="mailto:jonas.toth@gmail.com" target="_blank">jonas.toth@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>Hi,</p>
<p>you can try `const_cast` as first try to do it.<br>
</p>
<p>Jonas<br>
</p><div><div class="h5">
<br>
<div class="m_5852338317503187888moz-cite-prefix">Am 03.10.2017 um 21:31 schrieb Roman
Popov via cfe-dev:<br>
</div>
</div></div><blockquote type="cite"><div><div class="h5">
<div dir="ltr">Hello,
<div><br>
</div>
<div>I'm writing a code refactoring tool that needs some static
analysis capabilities.</div>
<div>I've noticed that AST Matchers return const AST nodes, but
static analysis sometimes wants to consume non-const pointers.</div>
<div><br>
</div>
<div>For example to build call graph I need to pass non-const
pointer:</div>
<div> CallGraph::addToCallGraph(<wbr>Decl *D)</div>
<div><br>
</div>
<div>So does static analysis modifies AST? Or it's just a bug in
method signature?</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Roman</div>
</div>
<br>
<fieldset class="m_5852338317503187888mimeAttachmentHeader"></fieldset>
<br>
</div></div><pre>______________________________<wbr>_________________
cfe-dev mailing list
<a class="m_5852338317503187888moz-txt-link-abbreviated" href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>
<a class="m_5852338317503187888moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<br>
</div>
</blockquote></div><br></div>