clang  6.0.0svn
Classes | Namespaces | Enumerations | Functions
Replacement.h File Reference
#include "clang/Basic/FileManager.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/SourceLocation.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/raw_ostream.h"
#include <map>
#include <set>
#include <string>
#include <system_error>
#include <vector>
Include dependency graph for Replacement.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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...
 

Namespaces

 clang
 Dataflow Directional Tag Classes.
 
 clang::tooling
 

Enumerations

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

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...
 
bool clang::tooling::applyAllReplacements (const Replacements &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...
 
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 (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. More...