diff options
| author | Daniel Berlin <dberlin@dberlin.org> | 2015-05-08 21:17:24 +0000 |
|---|---|---|
| committer | Daniel Berlin <dberlin@dberlin.org> | 2015-05-08 21:17:24 +0000 |
| commit | c67979bf4d301654e3863d0e3adc3f6a3d5bba29 (patch) | |
| tree | da15bc0b77e60b5daa0a6b76768ef5a437f9bbfd /llvm | |
| parent | 09c4424994c1e970b2740f791007defef421326c (diff) | |
| download | bcm5719-llvm-c67979bf4d301654e3863d0e3adc3f6a3d5bba29.tar.gz bcm5719-llvm-c67979bf4d301654e3863d0e3adc3f6a3d5bba29.zip | |
Add a comment about DepthFirstIterator's skipchildren behavior
llvm-svn: 236904
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/ADT/DepthFirstIterator.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/include/llvm/ADT/DepthFirstIterator.h b/llvm/include/llvm/ADT/DepthFirstIterator.h index e9668c45d10..d79b9acacfa 100644 --- a/llvm/include/llvm/ADT/DepthFirstIterator.h +++ b/llvm/include/llvm/ADT/DepthFirstIterator.h @@ -159,8 +159,10 @@ public: return *this; } - // skips all children of the current node and traverses to next node - // + /// \brief Skips all children of the current node and traverses to next node + /// + /// Note: This function takes care of incrementing the iterator. If you + /// always increment and call this function, you risk walking off the end. df_iterator &skipChildren() { VisitStack.pop_back(); if (!VisitStack.empty()) |

