clang 19.0.0git
Classes | Namespaces | Enumerations | Functions
Replacement.h File Reference
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/SourceLocation.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/raw_ostream.h"
#include <map>
#include <optional>
#include <set>
#include <string>
#include <system_error>
#include <utility>
#include <vector>

Go to the source code of this file.


class  clang::tooling::Range
 A source range independent of the SourceManager. More...
class  clang::tooling::Replacement
 A text replacement. More...
class  clang::tooling::ReplacementError
 Carries extra error information in replacement-related llvm::Error, e.g. More...
class  clang::tooling::Replacements
 Maintains a set of replacements that are conflict-free. More...
struct  clang::tooling::TranslationUnitReplacements
 Collection of Replacements generated from a single translation unit. More...


namespace  clang
 The JSON file list parser is used to communicate input to InstallAPI.
namespace  clang::tooling


enum class  clang::tooling::replacement_error { clang::tooling::fail_to_apply = 0 , clang::tooling::wrong_file_path , clang::tooling::overlap_conflict , clang::tooling::insert_conflict }


bool clang::tooling::operator< (const Replacement &LHS, const Replacement &RHS)
 Less-than operator between two Replacements.
bool clang::tooling::operator== (const Replacement &LHS, const Replacement &RHS)
 Equal-to operator between two Replacements.
bool clang::tooling::operator!= (const Replacement &LHS, const Replacement &RHS)
bool clang::tooling::applyAllReplacements (const Replacements &Replaces, Rewriter &Rewrite)
 Apply all replacements in Replaces to the Rewriter Rewrite.
llvm::Expected< std::string > clang::tooling::applyAllReplacements (StringRef Code, const Replacements &Replaces)
 Applies all replacements in Replaces to Code.
std::vector< Rangeclang::tooling::calculateRangesAfterReplacements (const Replacements &Replaces, const std::vector< Range > &Ranges)
 Calculates the new ranges after Replaces are applied.
std::map< std::string, Replacementsclang::tooling::groupReplacementsByFile (FileManager &FileMgr, const std::map< std::string, Replacements > &FileToReplaces)
 If there are multiple <File, Replacements> pairs with the same file entry, we only keep one pair and discard the rest.