clang API Documentation

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

namespace  clang
namespace  clang::tooling

Functions

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.
static int clang::tooling::getRangeSize (const SourceManager &Sources, const CharSourceRange &Range)
unsigned clang::tooling::shiftedCodePosition (const Replacements &Replaces, unsigned Position)
 Calculates how a code Position is shifted when Replaces are applied.
unsigned clang::tooling::shiftedCodePosition (const std::vector< Replacement > &Replaces, unsigned Position)
 Calculates how a code Position is shifted when Replaces are applied.
void clang::tooling::deduplicate (std::vector< Replacement > &Replaces, std::vector< Range > &Conflicts)
 Removes duplicate Replacements and reports if Replacements conflict with one another. All Replacements are assumed to be in the same file.
bool clang::tooling::applyAllReplacements (const Replacements &Replaces, Rewriter &Rewrite)
 Apply all replacements in Replaces to the Rewriter Rewrite.
bool clang::tooling::applyAllReplacements (const std::vector< Replacement > &Replaces, Rewriter &Rewrite)
 Apply all replacements in Replaces to the Rewriter Rewrite.
std::string clang::tooling::applyAllReplacements (StringRef Code, const Replacements &Replaces)
 Applies all replacements in Replaces to Code.

Variables

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