14using namespace tooling;
22 return Range.takeError();
24 std::optional<SelectedASTNode> Selection =
27 return Context.createDiagnosticError(
28 Range->getBegin(), diag::err_refactor_selection_invalid_ast);
29 return std::move(*Selection);
38 return ASTSelection.takeError();
39 std::unique_ptr<SelectedASTNode> StoredSelection =
40 std::make_unique<SelectedASTNode>(std::move(*ASTSelection));
41 std::optional<CodeRangeASTSelection> CodeRange =
45 return Context.createDiagnosticError(
46 Context.getSelectionRange().getBegin(),
47 diag::err_refactor_selection_invalid_ast);
48 Context.setASTSelection(std::move(StoredSelection));
49 return std::move(*CodeRange);
The refactoring rule context stores all of the inputs that might be needed by a refactoring action ru...
The JSON file list parser is used to communicate input to InstallAPI.