我正在尝试使用RecursiveASTVisitor去一次去使用多个文件的AST,并发现这种方法buildASTs从ClangTool,据说这是Create an AST for each file specified in the command line and append them to ASTs。 但是,我无法找到使用示例或指南。 任何人都有将多个来源的AST结合使用的经验? 我现在所做
我想确定在ASTvisitor中的变量声明是否是数组,如果是数组,我想确定数组的维数。下面你可以找到我的代码。 bool VisitVarDecl(VarDecl *var)
{
if (astContext->getSourceManager().isInMainFile(var->getLocStart())) //checks if the node is in the