clang  19.0.0git
Classes | Public Member Functions | List of all members
clang::arcmt::TransformActions Class Reference

#include "/home/runner/work/llvm/llvm/repo/clang/lib/ARCMigrate/Internals.h"

Classes

class  RewriteReceiver
 

Public Member Functions

 TransformActions (DiagnosticsEngine &diag, CapturedDiagList &capturedDiags, ASTContext &ctx, Preprocessor &PP)
 
 ~TransformActions ()
 
void startTransaction ()
 
bool commitTransaction ()
 
void abortTransaction ()
 
void insert (SourceLocation loc, StringRef text)
 
void insertAfterToken (SourceLocation loc, StringRef text)
 
void remove (SourceRange range)
 
void removeStmt (Stmt *S)
 
void replace (SourceRange range, StringRef text)
 
void replace (SourceRange range, SourceRange replacementRange)
 
void replaceStmt (Stmt *S, StringRef text)
 
void replaceText (SourceLocation loc, StringRef text, StringRef replacementText)
 
void increaseIndentation (SourceRange range, SourceLocation parentIndent)
 
bool clearDiagnostic (ArrayRef< unsigned > IDs, SourceRange range)
 
bool clearAllDiagnostics (SourceRange range)
 
bool clearDiagnostic (unsigned ID1, unsigned ID2, SourceRange range)
 
bool clearDiagnostic (unsigned ID1, unsigned ID2, unsigned ID3, SourceRange range)
 
bool hasDiagnostic (unsigned ID, SourceRange range)
 
bool hasDiagnostic (unsigned ID1, unsigned ID2, SourceRange range)
 
DiagnosticBuilder report (SourceLocation loc, unsigned diagId, SourceRange range=SourceRange())
 
void reportError (StringRef error, SourceLocation loc, SourceRange range=SourceRange())
 
void reportWarning (StringRef warning, SourceLocation loc, SourceRange range=SourceRange())
 
void reportNote (StringRef note, SourceLocation loc, SourceRange range=SourceRange())
 
bool hasReportedErrors () const
 
void applyRewrites (RewriteReceiver &receiver)
 

Detailed Description

Definition at line 49 of file Internals.h.

Constructor & Destructor Documentation

◆ TransformActions()

TransformActions::TransformActions ( DiagnosticsEngine diag,
CapturedDiagList capturedDiags,
ASTContext ctx,
Preprocessor PP 
)

Definition at line 605 of file TransformActions.cpp.

◆ ~TransformActions()

TransformActions::~TransformActions ( )

Definition at line 612 of file TransformActions.cpp.

Member Function Documentation

◆ abortTransaction()

void TransformActions::abortTransaction ( )

Definition at line 624 of file TransformActions.cpp.

Referenced by clang::arcmt::Transaction::abort().

◆ applyRewrites()

void TransformActions::applyRewrites ( RewriteReceiver receiver)

◆ clearAllDiagnostics()

bool clang::arcmt::TransformActions::clearAllDiagnostics ( SourceRange  range)
inline

Definition at line 76 of file Internals.h.

References clearDiagnostic(), and clang::transformer::range().

◆ clearDiagnostic() [1/3]

bool TransformActions::clearDiagnostic ( ArrayRef< unsigned IDs,
SourceRange  range 
)

◆ clearDiagnostic() [2/3]

bool clang::arcmt::TransformActions::clearDiagnostic ( unsigned  ID1,
unsigned  ID2,
SourceRange  range 
)
inline

Definition at line 79 of file Internals.h.

References clearDiagnostic(), and clang::transformer::range().

◆ clearDiagnostic() [3/3]

bool clang::arcmt::TransformActions::clearDiagnostic ( unsigned  ID1,
unsigned  ID2,
unsigned  ID3,
SourceRange  range 
)
inline

Definition at line 83 of file Internals.h.

References clearDiagnostic(), and clang::transformer::range().

◆ commitTransaction()

bool TransformActions::commitTransaction ( )

Definition at line 620 of file TransformActions.cpp.

Referenced by clang::arcmt::Transaction::~Transaction().

◆ hasDiagnostic() [1/2]

bool clang::arcmt::TransformActions::hasDiagnostic ( unsigned  ID,
SourceRange  range 
)
inline

◆ hasDiagnostic() [2/2]

bool clang::arcmt::TransformActions::hasDiagnostic ( unsigned  ID1,
unsigned  ID2,
SourceRange  range 
)
inline

◆ hasReportedErrors()

bool clang::arcmt::TransformActions::hasReportedErrors ( ) const
inline

◆ increaseIndentation()

void TransformActions::increaseIndentation ( SourceRange  range,
SourceLocation  parentIndent 
)

Definition at line 665 of file TransformActions.cpp.

References clang::transformer::range().

◆ insert()

void TransformActions::insert ( SourceLocation  loc,
StringRef  text 
)

◆ insertAfterToken()

void TransformActions::insertAfterToken ( SourceLocation  loc,
StringRef  text 
)

Definition at line 633 of file TransformActions.cpp.

References clang::comments::tok::text.

◆ remove()

void TransformActions::remove ( SourceRange  range)

◆ removeStmt()

void TransformActions::removeStmt ( Stmt S)

Definition at line 642 of file TransformActions.cpp.

◆ replace() [1/2]

void TransformActions::replace ( SourceRange  range,
SourceRange  replacementRange 
)

Definition at line 650 of file TransformActions.cpp.

References clang::transformer::range(), and replace().

◆ replace() [2/2]

void TransformActions::replace ( SourceRange  range,
StringRef  text 
)

Definition at line 646 of file TransformActions.cpp.

References clang::transformer::range(), and clang::comments::tok::text.

Referenced by replace().

◆ replaceStmt()

void TransformActions::replaceStmt ( Stmt S,
StringRef  text 
)

Definition at line 655 of file TransformActions.cpp.

◆ replaceText()

void TransformActions::replaceText ( SourceLocation  loc,
StringRef  text,
StringRef  replacementText 
)

◆ report()

DiagnosticBuilder TransformActions::report ( SourceLocation  loc,
unsigned  diagId,
SourceRange  range = SourceRange() 
)

◆ reportError()

void TransformActions::reportError ( StringRef  error,
SourceLocation  loc,
SourceRange  range = SourceRange() 
)

Definition at line 687 of file TransformActions.cpp.

References clang::transformer::range(), and report().

Referenced by errorForGCAttrsOnNonObjC().

◆ reportNote()

void TransformActions::reportNote ( StringRef  note,
SourceLocation  loc,
SourceRange  range = SourceRange() 
)

Definition at line 697 of file TransformActions.cpp.

References clang::transformer::range(), and report().

◆ reportWarning()

void TransformActions::reportWarning ( StringRef  warning,
SourceLocation  loc,
SourceRange  range = SourceRange() 
)

Definition at line 692 of file TransformActions.cpp.

References clang::transformer::range(), and report().

◆ startTransaction()

void TransformActions::startTransaction ( )

Definition at line 616 of file TransformActions.cpp.

Referenced by clang::arcmt::Transaction::Transaction().


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