clang  6.0.0svn
EditsReceiver.h
Go to the documentation of this file.
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 
15 namespace clang {
16  class SourceLocation;
17  class CharSourceRange;
18 
19 namespace edit {
20 
22 public:
23  virtual ~EditsReceiver() { }
24 
25  virtual void insert(SourceLocation loc, StringRef text) = 0;
26  virtual void replace(CharSourceRange range, StringRef text) = 0;
27  /// \brief By default it calls replace with an empty string.
28  virtual void remove(CharSourceRange range);
29 };
30 
31 }
32 
33 } // end namespace clang
34 
35 #endif
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
Represents a character-granular source range.
virtual void replace(CharSourceRange range, StringRef text)=0
Encodes a location in the source.
Dataflow Directional Tag Classes.
virtual void insert(SourceLocation loc, StringRef text)=0