1 //===- EditedSource.h - Collection of source edits --------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_CLANG_EDIT_EDITSRECEIVER_H
10 #define LLVM_CLANG_EDIT_EDITSRECEIVER_H
12 #include "clang/Basic/LLVM.h"
13 #include "clang/Basic/SourceLocation.h"
14 #include "llvm/ADT/StringRef.h"
21 virtual ~EditsReceiver() = default;
23 virtual void insert(SourceLocation loc, StringRef text) = 0;
24 virtual void replace(CharSourceRange range, StringRef text) = 0;
26 /// By default it calls replace with an empty string.
27 virtual void remove(CharSourceRange range);
33 #endif // LLVM_CLANG_EDIT_EDITSRECEIVER_H