| 1 | //===- EditedSource.h - Collection of source edits --------------*- C++ -*-===// | 
|---|
| 2 | // | 
|---|
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | 
|---|
| 4 | // See https://llvm.org/LICENSE.txt for license information. | 
|---|
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | 
|---|
| 6 | // | 
|---|
| 7 | //===----------------------------------------------------------------------===// | 
|---|
| 8 |  | 
|---|
| 9 | #ifndef LLVM_CLANG_EDIT_EDITSRECEIVER_H | 
|---|
| 10 | #define LLVM_CLANG_EDIT_EDITSRECEIVER_H | 
|---|
| 11 |  | 
|---|
| 12 | #include "clang/Basic/LLVM.h" | 
|---|
| 13 | #include "clang/Basic/SourceLocation.h" | 
|---|
| 14 | #include "llvm/ADT/StringRef.h" | 
|---|
| 15 |  | 
|---|
| 16 | namespace clang { | 
|---|
| 17 | namespace edit { | 
|---|
| 18 |  | 
|---|
| 19 | class EditsReceiver { | 
|---|
| 20 | public: | 
|---|
| 21 | virtual ~EditsReceiver() = default; | 
|---|
| 22 |  | 
|---|
| 23 | virtual void insert(SourceLocation loc, StringRef text) = 0; | 
|---|
| 24 | virtual void replace(CharSourceRange range, StringRef text) = 0; | 
|---|
| 25 |  | 
|---|
| 26 | /// By default it calls replace with an empty string. | 
|---|
| 27 | virtual void remove(CharSourceRange range); | 
|---|
| 28 | }; | 
|---|
| 29 |  | 
|---|
| 30 | } // namespace edit | 
|---|
| 31 | } // namespace clang | 
|---|
| 32 |  | 
|---|
| 33 | #endif // LLVM_CLANG_EDIT_EDITSRECEIVER_H | 
|---|
| 34 |  | 
|---|