summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/ADT/DepthFirstIterator.h6
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())
OpenPOWER on IntegriCloud