From: Daniel Berlin Date: Fri, 8 May 2015 21:17:24 +0000 (+0000) Subject: Add a comment about DepthFirstIterator's skipchildren behavior X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fd5c9868cb303e661ea1a13d4d8afb264808e8f5;p=oota-llvm.git Add a comment about DepthFirstIterator's skipchildren behavior git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236904 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/DepthFirstIterator.h b/include/llvm/ADT/DepthFirstIterator.h index e9668c45d10..d79b9acacfa 100644 --- a/include/llvm/ADT/DepthFirstIterator.h +++ b/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())