clang 20.0.0git
Public Member Functions | Static Public Attributes | List of all members
clang::tooling::ReplacementError Class Reference

Carries extra error information in replacement-related llvm::Error, e.g. More...

#include "clang/Tooling/Core/Replacement.h"

Inheritance diagram for clang::tooling::ReplacementError:
Inheritance graph
[legend]

Public Member Functions

 ReplacementError (replacement_error Err)
 
 ReplacementError (replacement_error Err, Replacement Existing)
 Constructs an error related to an existing replacement.
 
 ReplacementError (replacement_error Err, Replacement New, Replacement Existing)
 Constructs an error related to a new replacement and an existing replacement in a set of replacements.
 
std::string message () const override
 
void log (raw_ostream &OS) const override
 
replacement_error get () const
 
const std::optional< Replacement > & getNewReplacement () const
 
const std::optional< Replacement > & getExistingReplacement () const
 

Static Public Attributes

static char ID = 0
 

Detailed Description

Carries extra error information in replacement-related llvm::Error, e.g.

fail applying replacements and replacements conflict.

Definition at line 154 of file Replacement.h.

Constructor & Destructor Documentation

◆ ReplacementError() [1/3]

clang::tooling::ReplacementError::ReplacementError ( replacement_error  Err)
inline

Definition at line 156 of file Replacement.h.

◆ ReplacementError() [2/3]

clang::tooling::ReplacementError::ReplacementError ( replacement_error  Err,
Replacement  Existing 
)
inline

Constructs an error related to an existing replacement.

Definition at line 159 of file Replacement.h.

◆ ReplacementError() [3/3]

clang::tooling::ReplacementError::ReplacementError ( replacement_error  Err,
Replacement  New,
Replacement  Existing 
)
inline

Constructs an error related to a new replacement and an existing replacement in a set of replacements.

Definition at line 164 of file Replacement.h.

Member Function Documentation

◆ get()

replacement_error clang::tooling::ReplacementError::get ( ) const
inline

Definition at line 172 of file Replacement.h.

Referenced by clang::tooling::AtomicChange::insert().

◆ getExistingReplacement()

const std::optional< Replacement > & clang::tooling::ReplacementError::getExistingReplacement ( ) const
inline

Definition at line 180 of file Replacement.h.

Referenced by clang::tooling::AtomicChange::insert().

◆ getNewReplacement()

const std::optional< Replacement > & clang::tooling::ReplacementError::getNewReplacement ( ) const
inline

Definition at line 176 of file Replacement.h.

◆ log()

void clang::tooling::ReplacementError::log ( raw_ostream &  OS) const
inlineoverride

Definition at line 170 of file Replacement.h.

References message().

◆ message()

std::string ReplacementError::message ( ) const
override

Definition at line 181 of file Replacement.cpp.

References getReplacementErrString().

Referenced by log().

Member Data Documentation

◆ ID

char ReplacementError::ID = 0
static

Definition at line 174 of file Replacement.h.


The documentation for this class was generated from the following files: