Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:36:53

0001 //===- EditedSource.h - Collection of source edits --------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLVM_CLANG_EDIT_EDITSRECEIVER_H
0010 #define LLVM_CLANG_EDIT_EDITSRECEIVER_H
0011 
0012 #include "clang/Basic/LLVM.h"
0013 #include "clang/Basic/SourceLocation.h"
0014 #include "llvm/ADT/StringRef.h"
0015 
0016 namespace clang {
0017 namespace edit {
0018 
0019 class EditsReceiver {
0020 public:
0021   virtual ~EditsReceiver() = default;
0022 
0023   virtual void insert(SourceLocation loc, StringRef text) = 0;
0024   virtual void replace(CharSourceRange range, StringRef text) = 0;
0025 
0026   /// By default it calls replace with an empty string.
0027   virtual void remove(CharSourceRange range);
0028 };
0029 
0030 } // namespace edit
0031 } // namespace clang
0032 
0033 #endif // LLVM_CLANG_EDIT_EDITSRECEIVER_H