class Tree::ChildIteratorBase

Declaration

template <typename DerivedT, typename NodeT>
class Tree::ChildIteratorBase { /* full declaration omitted */ };

Description

Iterator over children (common base for const/non-const). Not invalidated by tree mutations (holds a stable node pointer).

Declared at: clang/include/clang/Tooling/Syntax/Tree.h:148

Templates

DerivedT
NodeT

Member Variables

protected NodeT* N = nullptr

Method Overview

Methods

ChildIteratorBase<DerivedT, NodeT>()

Declared at: clang/include/clang/Tooling/Syntax/Tree.h:156

ChildIteratorBase<DerivedT, NodeT>(NodeT* N)

Declared at: clang/include/clang/Tooling/Syntax/Tree.h:157

Parameters

NodeT* N

NodeT* asPointer() const

Description

The element, or nullptr if past-the-end.

Declared at: clang/include/clang/Tooling/Syntax/Tree.h:173

bool operator bool() const

Description

Truthy if valid (not past-the-end). This allows: if (auto It = find_if(N.children(), ...) )

Declared at: clang/include/clang/Tooling/Syntax/Tree.h:171