Jer*_*uah 5 c++ static-analysis clang abstract-syntax-tree llvm-clang
我已经阅读了此链接,但仍不完全了解TraverseDecl和VisitDecl(及其用例)之间有什么区别http://clang.llvm.org/doxygen/classclang_1_1RecursiveASTVisitor.html
编写RecursiveASTVisitor时应重写哪个方法?
小智 5
TraverseDecl 告诉前端库的 ASTConsumer 从 AST 递归地访问声明。然后调用 VisitDecl,您可以在其中提取相关信息。
请点击这两个链接了解更多详细信息和简单的检查器示例:
http://clang.llvm.org/docs/RAVFrontendAction.html