diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-05-04 01:00:35 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-05-04 01:00:35 +0000 |
commit | 4ed57820a2b14a979537ace3f03bde68baf386ee (patch) | |
tree | fef65e25e013893c4157a17b4248b996c2bf36f4 /lib/Driver/Tools.cpp | |
parent | b79d862af66d8dd9d059863813b9a27d744bd990 (diff) |
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
Diffstat (limited to 'lib/Driver/Tools.cpp')
0 files changed, 0 insertions, 0 deletions