Make RecursiveASTVisitor fully data recursive on Stmts, with
minimal disruption on its clients.

Unlike the previous data-recursive scheme, Traverse*Stmt methods are
always getting called. The base methods of RecursiveASTVisitor will enqueue
the sub-statements instead of calling TraverseStmt on them.

Clients that override a Traverse*Stmt method and call TraverseStmt will
still function as function-recursive traversal; if a client wants to
enqueue a sub-statement in its override method it can do it like this:

[inside the override method]
StmtQueueAction StmtQueue(*this);
StmtQueue.queue(Stmt->getSubStmt());

Should address rdar://11179167.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156141 91177308-0d34-0410-b5e6-96231b3b80d8
1 file changed