10 #ifndef LLVM_CLANG_TOOLING_REFACTOR_AST_SELECTION_H 11 #define LLVM_CLANG_TOOLING_REFACTOR_AST_SELECTION_H 57 : Node(Node), SelectionKind(SelectionKind) {}
61 void dump(llvm::raw_ostream &OS = llvm::errs())
const;
105 if (!AreChildrenSelected)
107 return SelectedNode.get().Children.size();
111 if (!AreChildrenSelected) {
112 assert(I == 0 &&
"Invalid index");
113 return SelectedNode.get().Node.get<
Stmt>();
115 return SelectedNode.get().Children[I].Node.get<
Stmt>();
127 bool isInFunctionLikeBodyOfCode()
const;
131 const Decl *getFunctionLikeNearestParent()
const;
139 bool AreChildrenSelected)
140 : SelectedNode(SelectedNode), Parents(Parents.begin(), Parents.end()),
141 AreChildrenSelected(AreChildrenSelected) {}
149 bool AreChildrenSelected;
155 #endif // LLVM_CLANG_TOOLING_REFACTOR_AST_SELECTION_H
Stmt - This represents one statement.
Decl - This represents one declaration (or definition), e.g.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
static void dump(llvm::raw_ostream &OS, StringRef FunctionName, ArrayRef< CounterExpression > Expressions, ArrayRef< CounterMappingRegion > Regions)
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
Dataflow Directional Tag Classes.
std::unique_ptr< DiagnosticConsumer > create(StringRef OutputFile, DiagnosticOptions *Diags, bool MergeChildRecords=false)
Returns a DiagnosticConsumer that serializes diagnostics to a bitcode file.
A dynamically typed AST node container.
Defines the clang::SourceLocation class and associated facilities.
A trivial tuple used to represent a source range.