clang 22.0.0git
clang::edit::EditedSource Class Reference

#include "clang/Edit/EditedSource.h"

Public Member Functions

 EditedSource (const SourceManager &SM, const LangOptions &LangOpts, const PPConditionalDirectiveRecord *PPRec=nullptr)
const SourceManagergetSourceManager () const
const LangOptionsgetLangOpts () const
const PPConditionalDirectiveRecordgetPPCondDirectiveRecord () const
bool canInsertInOffset (SourceLocation OrigLoc, FileOffset Offs)
bool commit (const Commit &commit)
void applyRewrites (EditsReceiver &receiver, bool adjustRemovals=true)
void clearRewrites ()
StringRef copyString (StringRef str)
StringRef copyString (const Twine &twine)

Detailed Description

Definition at line 35 of file EditedSource.h.

Constructor & Destructor Documentation

◆ EditedSource()

clang::edit::EditedSource::EditedSource ( const SourceManager & SM,
const LangOptions & LangOpts,
const PPConditionalDirectiveRecord * PPRec = nullptr )
inline

Definition at line 73 of file EditedSource.h.

References SM.

Referenced by commit().

Member Function Documentation

◆ applyRewrites()

void EditedSource::applyRewrites ( EditsReceiver & receiver,
bool adjustRemovals = true )

Definition at line 407 of file EditedSource.cpp.

References applyRewrite(), and clang::edit::FileOffset::getWithOffset().

Referenced by mergeFixits().

◆ canInsertInOffset()

bool EditedSource::canInsertInOffset ( SourceLocation OrigLoc,
FileOffset Offs )

Definition at line 72 of file EditedSource.cpp.

◆ clearRewrites()

void EditedSource::clearRewrites ( )

Definition at line 447 of file EditedSource.cpp.

◆ commit()

bool EditedSource::commit ( const Commit & commit)

◆ copyString() [1/2]

StringRef EditedSource::copyString ( const Twine & twine)

Definition at line 67 of file EditedSource.cpp.

References copyString(), and clang::Data.

◆ copyString() [2/2]

StringRef clang::edit::EditedSource::copyString ( StringRef str)
inline

Definition at line 91 of file EditedSource.h.

Referenced by copyString().

◆ getLangOpts()

const LangOptions & clang::edit::EditedSource::getLangOpts ( ) const
inline

Definition at line 78 of file EditedSource.h.

◆ getPPCondDirectiveRecord()

const PPConditionalDirectiveRecord * clang::edit::EditedSource::getPPCondDirectiveRecord ( ) const
inline

Definition at line 80 of file EditedSource.h.

◆ getSourceManager()

const SourceManager & clang::edit::EditedSource::getSourceManager ( ) const
inline

Definition at line 77 of file EditedSource.h.


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