<div dir="ltr">I figured out the problem myself. Traverse* only hits the base class of each node (e.g. Decl, Stmt, or Type), and the dynamic class of each node. Since ExplicitCastExpr is abstract, TraverseExplicitCastExpr is not valid. Instead I needed to use VisitExplicitCastExpr.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 22, 2017 at 11:55 AM, scott constable <span dir="ltr"><<a href="mailto:sdconsta@syr.edu" target="_blank">sdconsta@syr.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I'm writing a clang libtool using RecursiveASTVisitor, and I've noticed that I can define Traverse* for some types, but not others. For instance, I can define TraverseArraySubscriptExpr() and TraverseMemberExpr(), but not TraverseExplicitCastExpr(). So I can write</div><div><br></div><div>bool MyVisitor::<wbr>TraverseExplicitCastExpr(<wbr>ExplicitCastExpr *ECE) {</div><div>  // do some stuff</div><div>  return RecursiveASTVisitor<MyVisitor><wbr>::TraverseExplicitCastExpr(<wbr>ECE);</div><div>}</div><div><br></div><div>but then the compiler complains that there is no TraverseExplicitCastExpr in the base class RecursiveASTVisitor<MyVisitor><wbr>. But if I do the same for an ArraySubscriptExpr, it compiles just fine.</div><div><br></div><div>Any insight into this matter would be much appreciated.</div><div><br></div><div>Thanks,</div><div><br></div><div>Scott Constable</div></div>
</blockquote></div><br></div>