clang  3.9.0
Namespaces | Functions | Variables
Replacement.cpp File Reference
#include "clang/Tooling/Core/Replacement.h"
#include "clang/Basic/Diagnostic.h"
#include "clang/Basic/DiagnosticIDs.h"
#include "clang/Basic/DiagnosticOptions.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Lex/Lexer.h"
#include "clang/Rewrite/Core/Rewriter.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/raw_os_ostream.h"
Include dependency graph for Replacement.cpp:

Go to the source code of this file.

Namespaces

 clang
 Dataflow Directional Tag Classes.
 
 clang::tooling
 

Functions

bool clang::tooling::operator< (const Replacement &LHS, const Replacement &RHS)
 Less-than operator between two Replacements. More...
 
bool clang::tooling::operator== (const Replacement &LHS, const Replacement &RHS)
 Equal-to operator between two Replacements. More...
 
static int clang::tooling::getRangeSize (const SourceManager &Sources, const CharSourceRange &Range, const LangOptions &LangOpts)
 
template<typename T >
unsigned clang::tooling::shiftedCodePositionInternal (const T &Replaces, unsigned Position)
 
unsigned clang::tooling::shiftedCodePosition (const Replacements &Replaces, unsigned Position)
 Calculates how a code Position is shifted when Replaces are applied. More...
 
unsigned clang::tooling::shiftedCodePosition (const std::vector< Replacement > &Replaces, unsigned Position)
 Calculates how a code Position is shifted when Replaces are applied. More...
 
void clang::tooling::deduplicate (std::vector< Replacement > &Replaces, std::vector< Range > &Conflicts)
 Removes duplicate Replacements and reports if Replacements conflict with one another. More...
 
bool clang::tooling::applyAllReplacements (const Replacements &Replaces, Rewriter &Rewrite)
 Apply all replacements in Replaces to the Rewriter Rewrite. More...
 
bool clang::tooling::applyAllReplacements (const std::vector< Replacement > &Replaces, Rewriter &Rewrite)
 Apply all replacements in Replaces to the Rewriter Rewrite. More...
 
llvm::Expected< std::string > clang::tooling::applyAllReplacements (StringRef Code, const Replacements &Replaces)
 Applies all replacements in Replaces to Code. More...
 
static std::vector< Range > clang::tooling::mergeAndSortRanges (std::vector< Range > Ranges)
 
std::vector< Range > clang::tooling::calculateChangedRanges (const Replacements &Replaces)
 Calculates the ranges in a single file that are affected by the Replacements. More...
 
std::vector< Range > clang::tooling::calculateRangesAfterReplacements (const Replacements &Replaces, const std::vector< Range > &Ranges)
 Calculates the new ranges after Replaces are applied. More...
 
std::map< std::string,
Replacements > 
clang::tooling::groupReplacementsByFile (const Replacements &Replaces)
 Groups a random set of replacements by file path. More...
 
Replacements clang::tooling::mergeReplacements (const Replacements &First, const Replacements &Second)
 Merges two sets of replacements with the second set referring to the code after applying the first set. More...
 

Variables

static const char *const clang::tooling::InvalidLocation = ""
 

Variable Documentation

int Delta

Definition at line 414 of file Replacement.cpp.

Referenced by isCompatibleWithFields(), and clang::tooling::mergeReplacements().

int DeltaFirst

Definition at line 419 of file Replacement.cpp.

const StringRef FilePath
unsigned Length
bool MergeSecond

Definition at line 410 of file Replacement.cpp.

Definition at line 424 of file Replacement.cpp.

Referenced by clang::tooling::shiftedCodePositionInternal().

std::string Text

Definition at line 426 of file Replacement.cpp.