clang  6.0.0svn
Public Types | Public Member Functions | Public Attributes | List of all members
clang::tooling::SelectedASTNode Struct Reference

Represents a selected AST node. More...

#include "clang/Tooling/Refactoring/ASTSelection.h"

Collaboration diagram for clang::tooling::SelectedASTNode:
Collaboration graph
[legend]

Public Types

using ReferenceType = std::reference_wrapper< const SelectedASTNode >
 

Public Member Functions

 SelectedASTNode (const ast_type_traits::DynTypedNode &Node, SourceSelectionKind SelectionKind)
 
 SelectedASTNode (SelectedASTNode &&)=default
 
SelectedASTNodeoperator= (SelectedASTNode &&)=default
 
void dump (llvm::raw_ostream &OS=llvm::errs()) const
 

Public Attributes

ast_type_traits::DynTypedNode Node
 
SourceSelectionKind SelectionKind
 
std::vector< SelectedASTNodeChildren
 

Detailed Description

Represents a selected AST node.

AST selection is represented using a tree of SelectedASTNode. The tree follows the top-down shape of the actual AST. Each selected node has a selection kind. The kind might be none as the node itself might not actually be selected, e.g. a statement in macro whose child is in a macro argument.

Definition at line 50 of file ASTSelection.h.

Member Typedef Documentation

◆ ReferenceType

using clang::tooling::SelectedASTNode::ReferenceType = std::reference_wrapper<const SelectedASTNode>

Definition at line 63 of file ASTSelection.h.

Constructor & Destructor Documentation

◆ SelectedASTNode() [1/2]

clang::tooling::SelectedASTNode::SelectedASTNode ( const ast_type_traits::DynTypedNode Node,
SourceSelectionKind  SelectionKind 
)
inline

Definition at line 55 of file ASTSelection.h.

References dump().

◆ SelectedASTNode() [2/2]

clang::tooling::SelectedASTNode::SelectedASTNode ( SelectedASTNode &&  )
default

Member Function Documentation

◆ dump()

void SelectedASTNode::dump ( llvm::raw_ostream &  OS = llvm::errs()) const

Definition at line 232 of file ASTSelection.cpp.

References dump().

◆ operator=()

SelectedASTNode& clang::tooling::SelectedASTNode::operator= ( SelectedASTNode &&  )
default

Member Data Documentation

◆ Children

std::vector<SelectedASTNode> clang::tooling::SelectedASTNode::Children

Definition at line 53 of file ASTSelection.h.

Referenced by findDeepestWithKind(), and hasAnyDirectChildrenWithKind().

◆ Node

ast_type_traits::DynTypedNode clang::tooling::SelectedASTNode::Node

Definition at line 51 of file ASTSelection.h.

Referenced by findDeepestWithKind().

◆ SelectionKind

SourceSelectionKind clang::tooling::SelectedASTNode::SelectionKind

Definition at line 52 of file ASTSelection.h.


The documentation for this struct was generated from the following files: