clang  6.0.0svn
Classes | Public Member Functions | List of all members
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 30 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 66 of file EditedSource.h.

Member Function Documentation

◆ applyRewrites()

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

Definition at line 397 of file EditedSource.cpp.

Referenced by getPPCondDirectiveRecord().

◆ canInsertInOffset()

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

Definition at line 64 of file EditedSource.cpp.

Referenced by getPPCondDirectiveRecord(), and clang::edit::Commit::replaceText().

◆ clearRewrites()

void EditedSource::clearRewrites ( )

◆ commit()

bool EditedSource::commit ( const Commit commit)

Definition at line 266 of file EditedSource.cpp.

References clang::edit::Commit::isCommitable().

Referenced by getPPCondDirectiveRecord().

◆ copyString() [1/2]

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

Definition at line 84 of file EditedSource.h.

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

◆ copyString() [2/2]

StringRef EditedSource::copyString ( const Twine &  twine)

Definition at line 59 of file EditedSource.cpp.

References copyString().

◆ getLangOpts()

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

Definition at line 72 of file EditedSource.h.

◆ getPPCondDirectiveRecord()

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

Definition at line 73 of file EditedSource.h.

References applyRewrites(), canInsertInOffset(), clearRewrites(), and commit().

◆ getSourceManager()

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

Definition at line 71 of file EditedSource.h.


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