clang  3.8.0
Namespaces | Functions | Variables
Replacement.cpp File Reference
#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 "clang/Tooling/Core/Replacement.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...
 
std::string clang::tooling::applyAllReplacements (StringRef Code, const Replacements &Replaces)
 Applies all replacements in Replaces to Code. 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 364 of file Replacement.cpp.

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

int DeltaFirst

Definition at line 369 of file Replacement.cpp.

const StringRef FilePath
unsigned Length
bool MergeSecond

Definition at line 360 of file Replacement.cpp.

Definition at line 374 of file Replacement.cpp.

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

std::string Text

Definition at line 376 of file Replacement.cpp.