我无法找到一个查看API的人,但基本上我想要以下内容:在所有的Visit *方法之后,我会调用最终方法对我的数据成员进行一些后处理。我认为它与访问TranslationUnitDecl类似,除了不是第一次访问方法,它不是最后一种。
答案 0 :(得分:1)
您可以在HandleTranslationUnit方法中添加这样做。
void MyVisitor::HandleTranslationUnit(ASTContext &Context) {
...
TraverseDecl(Context.getTranslationUnitDecl());
// Do post-processing here
}