summaryrefslogtreecommitdiffstats
path: root/include/clang/Edit/EditsReceiver.h
blob: 600ac28ea920ee1124fb868f2c9b571b545cb02f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//===----- EditedSource.h - Collection of source edits ----------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_CLANG_EDIT_EDITSRECEIVER_H
#define LLVM_CLANG_EDIT_EDITSRECEIVER_H

#include "clang/Basic/LLVM.h"

namespace clang {
  class SourceLocation;
  class CharSourceRange;

namespace edit {

class EditsReceiver {
public:
  virtual ~EditsReceiver() { }

  virtual void insert(SourceLocation loc, StringRef text) = 0;
  virtual void replace(CharSourceRange range, StringRef text) = 0;
  /// \brief By default it calls replace with an empty string.
  virtual void remove(CharSourceRange range);
};

}

} // end namespace clang

#endif