diff options
Diffstat (limited to 'clang/include/clang/Tooling/Syntax/Tree.h')
-rw-r--r-- | clang/include/clang/Tooling/Syntax/Tree.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/include/clang/Tooling/Syntax/Tree.h b/clang/include/clang/Tooling/Syntax/Tree.h index 8702fe60ce1b..bc581004c46e 100644 --- a/clang/include/clang/Tooling/Syntax/Tree.h +++ b/clang/include/clang/Tooling/Syntax/Tree.h @@ -126,6 +126,8 @@ private: // FactoryImpl sets CanModify flag. friend class FactoryImpl; + void setRole(NodeRole NR); + Tree *Parent; Node *NextSibling; unsigned Kind : 16; @@ -171,8 +173,11 @@ private: /// Prepend \p Child to the list of children and and sets the parent pointer. /// A very low-level operation that does not check any invariants, only used /// by TreeBuilder and FactoryImpl. - /// EXPECTS: Role != NodeRoleDetached. + /// EXPECTS: Role != Detached. void prependChildLowLevel(Node *Child, NodeRole Role); + /// Like the previous overload, but does not set role for \p Child. + /// EXPECTS: Child->Role != Detached + void prependChildLowLevel(Node *Child); friend class TreeBuilder; friend class FactoryImpl; |