9 #ifndef LLVM_CLANG_TOOLING_REFACTOR_AST_SELECTION_H 10 #define LLVM_CLANG_TOOLING_REFACTOR_AST_SELECTION_H 56 : Node(Node), SelectionKind(SelectionKind) {}
60 void dump(llvm::raw_ostream &OS = llvm::errs())
const;
104 if (!AreChildrenSelected)
106 return SelectedNode.get().Children.size();
110 if (!AreChildrenSelected) {
111 assert(I == 0 &&
"Invalid index");
112 return SelectedNode.get().Node.get<
Stmt>();
114 return SelectedNode.get().Children[I].Node.get<
Stmt>();
126 bool isInFunctionLikeBodyOfCode()
const;
130 const Decl *getFunctionLikeNearestParent()
const;
138 bool AreChildrenSelected)
139 : SelectedNode(SelectedNode), Parents(Parents.begin(), Parents.end()),
140 AreChildrenSelected(AreChildrenSelected) {}
148 bool AreChildrenSelected;
154 #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.