]> granicus.if.org Git - clang/commit
[libclang] The annotation of tokens operation visits statement nodes code-recursively.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Sat, 1 Sep 2012 18:27:30 +0000 (18:27 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Sat, 1 Sep 2012 18:27:30 +0000 (18:27 +0000)
commitd579dd5cc43e657647f38be5dd47c8974cd43108
tree38ff801cde2ecc833f611a211f9a3cc99f26a2a7
parent91ab900a939e95d965e18299b66928fdbe2aa38d
[libclang] The annotation of tokens operation visits statement nodes code-recursively.
This can blow the stack with extremely deep hierarchies. Switch it to data-recursive.

This is implemented by introducing a post-children visitation callback that the
CursorVisitor is calling after child nodes of a cursor have been visited.
This is used by the annotate-tokens visitor to do extra work at that point.

rdar://11979525.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163071 91177308-0d34-0410-b5e6-96231b3b80d8
test/Index/annotate-deep-statements.cpp [new file with mode: 0644]
tools/libclang/CIndex.cpp
tools/libclang/CursorVisitor.h