<div dir="ltr">Hi,<div><br></div><div>I'm developing a code browsing tool based on clang. And one problem I have is how to handle invalid code. e.g.</div><div><br></div><div>#include "B.h"</div><div><br></div><div>class A {</div><div> B b;</div><div>}</div><div><br></div><div>if clang can't find B.h so that B is undefined, then it seems RecursiveASTVisitor don't even let you visit the AST for invalid "B" under FieldRecord/</div>
<div><br></div><div>However, in my use case, I really want to go to that AST node "B" and find out that it is a invalid AST and then try do to search the symbol from other places (e.g. database). </div><div><br></div><div>So is there anyway we could potentially access the invalid AST?</div><div><br clear="all"><div><div class="gmail_signature">Thanks,<br>Fuyao</div></div>
</div></div>