[cfe-dev] How get next node from current node in AST?

Vladimir VladimirPlyashkun at yandex.ru
Thu Sep 19 02:02:05 PDT 2013


Hello everyone! Maybe is there some method like currNode->nextNode() ?
For example, i have this code:

//some code here
for(int i = 0; i < 10; ++i) { /* some code */ }
int var2;
//some code here

For example, i have an overriden method

bool TraverseForStmt(clang::ForStmt* forStmt)
{
    // here i could get a forBody by calling forStmt->getBody().
    // i could get  parents by calling method on ASTContext
   // but how to get next node (get node after forStmt i.e. get 'int var2'
node)? 
   //My task is to know that some nodes comes after forStmt.
}
I read documentation, but have not found an answear. 



--
View this message in context: http://clang-developers.42468.n3.nabble.com/How-get-next-node-from-current-node-in-AST-tp4034572.html
Sent from the Clang Developers mailing list archive at Nabble.com.



More information about the cfe-dev mailing list