I've read this link but still don't fully understand what's the difference between TraverseDecl and VisitDecl (and their use case) http://clang.llvm.org/doxygen/classclang_1_1RecursiveASTVisitor.html
Which method should I be overriding when writing my RecursiveASTVisitor?
TraverseDecl tells the frontend library's ASTConsumer to visit declarations recursively from the AST. Then VisitDecl is called where you can extract the relevant information.
Follow these two links for more details and a simple checker example:
http://clang.llvm.org/docs/RAVFrontendAction.html
How to traverse clang AST manually ?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With