I couldn't find one looking at the API, but essentially I want the following: after all of the Visit* methods, I'd call a final method that does some postprocessing on my data members. I'd assume it'd be something similar to visiting a TranslationUnitDecl, except instead of being the first visit method, it'd be the last.
Asked
Active
Viewed 139 times
1 Answers
1
You can add do this within a HandleTranslationUnit method.
void MyVisitor::HandleTranslationUnit(ASTContext &Context) {
...
TraverseDecl(Context.getTranslationUnitDecl());
// Do post-processing here
}

Hemant
- 767
- 6
- 20
-
A bit unideal, since this is outside of the scope of the traversal and depends on whatever application calls the traversal to do the post-processing. – srujzs Oct 17 '17 at 17:53