clang
3.9.0
|
#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"
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 = "" |
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 |
Definition at line 423 of file Replacement.cpp.
Referenced by clang::ASTWriter::AddPath(), computeRelativePath(), llvm::yaml::MappingTraits< clang::tooling::Replacement >::NormalizedReplacement::denormalize(), clang::ASTWriter::EmitRecordWithPath(), FindVisualStudioExecutable(), clang::tooling::formatAndApplyAllReplacements(), clang::FileManager::getBufferForFile(), clang::tooling::FixedCompilationDatabase::getCompileCommands(), clang::FileManager::getNoncachedStatValue(), clang::driver::toolchains::MSVCToolChain::getVisualStudioBinariesFolder(), clang::driver::toolchains::Generic_GCC::CudaInstallationDetector::init(), and clang::driver::toolchains::NaClToolChain::NaClToolChain().
unsigned Length |
Definition at line 425 of file Replacement.cpp.
Referenced by clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnOMPArraySectionExpr(), clang::Sema::BuildPredefinedExpr(), CheckArrayExpressionDoesNotReferToUnitySize(), CheckArrayExpressionDoesNotReferToWholeSize(), collectSubRegionBindings(), clang::SizeOfPackExpr::Create(), llvm::yaml::MappingTraits< clang::tooling::Replacement >::NormalizedReplacement::denormalize(), clang::CodeGen::CodeGenFunction::EmitOMPArraySectionExpr(), clang::comments::Token::getEndLocation(), clang::edit::Commit::Edit::getFileRange(), clang::edit::Commit::Edit::getInsertFromRange(), clang::comments::Token::getLength(), clang::SizeOfPackExpr::getPackLength(), getSpellingSlow(), clang::SourceManager::isInSLocAddrSpace(), clang::SizeOfPackExpr::isPartiallySubstituted(), clang::comments::TextTokenRetokenizer::lexDelimitedSeq(), clang::comments::TextTokenRetokenizer::lexWord(), clang::OMPArraySectionExpr::OMPArraySectionExpr(), clang::format::CommaSeparatedList::precomputeFormattingInfos(), printWordWrapped(), clang::APValue::LV::resizePath(), clang::APValue::MemberPointerData::resizePath(), and clang::comments::Token::setLength().
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.