clang 10.0.0git

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

`#include "/work/www-prereleases/10.0.0/rc1/docsbuild/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 47 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 | ) |

Definition at line 676 of file TransformActions.cpp.

## ◆ clearAllDiagnostics()

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

Definition at line 74 of file Internals.h.

References clang::arcmt::CapturedDiagList::clearDiagnostic().

## ◆ clearDiagnostic() [1/3]

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

Definition at line 671 of file TransformActions.cpp.

Referenced by checkAllAtProps(), and checkWeakGCAttrs().

## ◆ clearDiagnostic() [2/3]

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

Definition at line 77 of file Internals.h.

References clang::arcmt::CapturedDiagList::clearDiagnostic().

## ◆ clearDiagnostic() [3/3]

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

Definition at line 81 of file Internals.h.

References clang::arcmt::CapturedDiagList::clearDiagnostic().

## ◆ 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

Definition at line 87 of file Internals.h.

References clang::arcmt::CapturedDiagList::hasDiagnostic().

## ◆ hasDiagnostic() [2/2]

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

Definition at line 91 of file Internals.h.

References clang::arcmt::CapturedDiagList::hasDiagnostic().

## ◆ hasReportedErrors()

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

Definition at line 105 of file Internals.h.

References clang::DiagnosticsEngine::hasUnrecoverableErrorOccurred().

## ◆ increaseIndentation()

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

Definition at line 665 of file TransformActions.cpp.

## ◆ insert()

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

Definition at line 629 of file TransformActions.cpp.

Referenced by GCRewriteFinalize().

## ◆ insertAfterToken()

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

Definition at line 633 of file TransformActions.cpp.

Referenced by GCRewriteFinalize().

## ◆ remove()

void TransformActions::remove | ( | SourceRange | range | ) |

Definition at line 638 of file TransformActions.cpp.

Referenced by checkAllAtProps(), cleanupDeallocOrFinalize(), and clang::arcmt::trans::removeEmptyStatementsAndDeallocFinalize().

## ◆ removeStmt()

void TransformActions::removeStmt | ( | Stmt * | S | ) |

Definition at line 642 of file TransformActions.cpp.

## ◆ replace() [1/2]

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

Definition at line 646 of file TransformActions.cpp.

Referenced by replace().

## ◆ replace() [2/2]

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

Definition at line 650 of file TransformActions.cpp.

References 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
| ) |  |

Definition at line 659 of file TransformActions.cpp.

Referenced by checkWeakGCAttrs(), cleanupDeallocOrFinalize(), and clang::arcmt::trans::BlockObjCVariableTraverser::traverseBody().

## ◆ report()

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

Definition at line 680 of file TransformActions.cpp.

References clang::transformer::range(), and clang::DiagnosticsEngine::Report().

Referenced by reportError(), reportNote(), and reportWarning().

## ◆ reportError()

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

Definition at line 687 of file TransformActions.cpp.

References report().

Referenced by errorForGCAttrsOnNonObjC().

## ◆ reportNote()

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

Definition at line 697 of file TransformActions.cpp.

References report().

## ◆ reportWarning()

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

Definition at line 692 of file TransformActions.cpp.

References 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:

- lib/ARCMigrate/Internals.h
- lib/ARCMigrate/TransformActions.cpp