]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/clang/include/clang/Edit/EditsReceiver.h
Merge clang 7.0.1 and several follow-up changes
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / clang / include / clang / Edit / EditsReceiver.h
1 //===- EditedSource.h - Collection of source edits --------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef LLVM_CLANG_EDIT_EDITSRECEIVER_H
11 #define LLVM_CLANG_EDIT_EDITSRECEIVER_H
12
13 #include "clang/Basic/LLVM.h"
14 #include "clang/Basic/SourceLocation.h"
15 #include "llvm/ADT/StringRef.h"
16
17 namespace clang {
18 namespace edit {
19
20 class EditsReceiver {
21 public:
22   virtual ~EditsReceiver() = default;
23
24   virtual void insert(SourceLocation loc, StringRef text) = 0;
25   virtual void replace(CharSourceRange range, StringRef text) = 0;
26
27   /// By default it calls replace with an empty string.
28   virtual void remove(CharSourceRange range);
29 };
30
31 } // namespace edit
32 } // namespace clang
33
34 #endif // LLVM_CLANG_EDIT_EDITSRECEIVER_H