I’m new to clang and having a little trouble. Would be happy to get some help.
I’m trying to build a tool that (among other things) combines two code parts: The first one is a c file that is given by the user and the second is a fixed c function.
I want to have access to the AST nodes of both code parts, extract the relevant stmts from each, and build from them a new compoundStmt node (initiated with a vector<Stmt*>), which will be transformed back to c code.
I’m having trouble with getting access to both AST’s simultaneously.
I tried to access the input code with libTooling by running the following command from main:
I’m new to clang and having a little trouble. Would be happy to get some help.
I’m trying to build a tool that (among other things) combines two code parts: The first one is a c file that is given by the user and the second is a fixed c function.
I want to have access to the AST nodes of both code parts, extract the relevant stmts from each, and build from them a new compoundStmt node (initiated with a vector<Stmt*>), which will be transformed back to c code.
I’m having trouble with getting access to both AST’s simultaneously.
I tried to access the input code with libTooling by running the following command from main: