diff options
author | Eli Bendersky <eliben@google.com> | 2014-05-29 02:35:27 +0000 |
---|---|---|
committer | Eli Bendersky <eliben@google.com> | 2014-05-29 02:35:27 +0000 |
commit | 086e5816b034754897e9c91713bdbc98633adea7 (patch) | |
tree | 15f4520737bf261454c28d484c7a8d58bf233131 /clang/lib/Serialization/ASTReaderDecl.cpp | |
parent | f74aae2c2d4308052c6a70584a018ad6b5d70c0a (diff) | |
download | bcm5719-llvm-086e5816b034754897e9c91713bdbc98633adea7.tar.gz bcm5719-llvm-086e5816b034754897e9c91713bdbc98633adea7.zip |
Implement a convenience recursive walk method over a cursor and its descendants.
Before r160106 there was a way to recursively visit all descendants of a cursor
via Cursor_visit, but it was removed. Since then, every user needs to
reimplement the recursive descent into get_children.
Adding a walk_preorder() method to Cursor that conveniently implements recursive
walking in a Pythonic way. This also greatly simplifies get_cursor and
get_cursors in tests/cindex/util.py (walk_preorder is now tested through these
utility functions, since they are used in many tests).
llvm-svn: 209793
Diffstat (limited to 'clang/lib/Serialization/ASTReaderDecl.cpp')
0 files changed, 0 insertions, 0 deletions