clang API Documentation
#include <EditedSource.h>
Classes | |
struct | FileEdit |
Public Member Functions | |
EditedSource (const SourceManager &SM, const LangOptions &LangOpts, const PPConditionalDirectiveRecord *PPRec=nullptr) | |
const SourceManager & | getSourceManager () const |
const LangOptions & | getLangOpts () const |
const PPConditionalDirectiveRecord * | getPPCondDirectiveRecord () const |
bool | canInsertInOffset (SourceLocation OrigLoc, FileOffset Offs) |
bool | commit (const Commit &commit) |
void | applyRewrites (EditsReceiver &receiver) |
void | clearRewrites () |
StringRef | copyString (StringRef str) |
StringRef | copyString (const Twine &twine) |
Definition at line 27 of file EditedSource.h.
clang::edit::EditedSource::EditedSource | ( | const SourceManager & | SM, |
const LangOptions & | LangOpts, | ||
const PPConditionalDirectiveRecord * | PPRec = nullptr |
||
) | [inline] |
Definition at line 47 of file EditedSource.h.
void EditedSource::applyRewrites | ( | EditsReceiver & | receiver | ) |
Definition at line 336 of file EditedSource.cpp.
References applyRewrite(), and clang::edit::FileOffset::getWithOffset().
Referenced by applyEditsToTemp(), mergeFixits(), and clang::FixItRewriter::WriteFixedFiles().
bool EditedSource::canInsertInOffset | ( | SourceLocation | OrigLoc, |
FileOffset | Offs | ||
) |
Definition at line 31 of file EditedSource.cpp.
References clang::SourceManager::getImmediateExpansionRange(), clang::SourceLocation::getRawEncoding(), and clang::SourceManager::isMacroArgExpansion().
void EditedSource::clearRewrites | ( | ) |
Definition at line 373 of file EditedSource.cpp.
bool EditedSource::commit | ( | const Commit & | commit | ) |
Definition at line 218 of file EditedSource.cpp.
References clang::edit::Commit::Act_Insert, clang::edit::Commit::Act_InsertFromRange, clang::edit::Commit::Act_Remove, clang::edit::Commit::Edit::BeforePrev, clang::edit::Commit::edit_begin(), clang::edit::Commit::edit_end(), clang::edit::Commit::Edit::InsertFromRangeOffs, clang::edit::Commit::isCommitable(), clang::edit::Commit::Edit::Kind, clang::edit::Commit::Edit::Length, clang::edit::Commit::Edit::Offset, clang::edit::Commit::Edit::OrigLoc, and clang::edit::Commit::Edit::Text.
Referenced by applyEditsToTemp(), clang::FixItRewriter::HandleDiagnostic(), and mergeFixits().
StringRef clang::edit::EditedSource::copyString | ( | StringRef | str | ) | [inline] |
Definition at line 65 of file EditedSource.h.
Referenced by copyString().
StringRef EditedSource::copyString | ( | const Twine & | twine | ) |
Definition at line 26 of file EditedSource.cpp.
References copyString().
const LangOptions& clang::edit::EditedSource::getLangOpts | ( | ) | const [inline] |
Definition at line 53 of file EditedSource.h.
const PPConditionalDirectiveRecord* clang::edit::EditedSource::getPPCondDirectiveRecord | ( | ) | const [inline] |
Definition at line 54 of file EditedSource.h.
const SourceManager& clang::edit::EditedSource::getSourceManager | ( | ) | const [inline] |
Definition at line 52 of file EditedSource.h.