clang: clang::CharSourceRange Class Reference (original) (raw)

Represents a character-granular source range. More...

#include "[clang/Basic/SourceLocation.h](SourceLocation%5F8h%5Fsource.html)"

Public Member Functions
CharSourceRange ()=default
CharSourceRange (SourceRange R, bool ITR)
bool isTokenRange () const
Return true if the end of this range specifies the start of the last token.
bool isCharRange () const
SourceLocation getBegin () const
SourceLocation getEnd () const
SourceRange getAsRange () const
void setBegin (SourceLocation b)
void setEnd (SourceLocation e)
void setTokenRange (bool TR)
bool isValid () const
bool isInvalid () const

Detailed Description

Represents a character-granular source range.

The underlying SourceRange can either specify the starting/ending character of the range, or it can specify the start of the range and the start of the last token of the range (a "token range"). In the token range case, the size of the last token must be measured to determine the actual end of the range.

Definition at line 258 of file SourceLocation.h.

Constructor & Destructor Documentation

clang::CharSourceRange::CharSourceRange ( ) default

CharSourceRange() [2/2]

Member Function Documentation

getAsRange()

SourceRange clang::CharSourceRange::getAsRange ( ) const inline

getBegin()

Definition at line 288 of file SourceLocation.h.

Referenced by clang::Sema::ActOnGCCAsmStmt(), CheckMoveOnConstruction(), createTextRegion(), DiagnoseNullConversion(), DiagUninitUse(), clang::markup::EmitRange(), findLinesForRange(), clang::SourceManager::getExpansionRange(), clang::SourceManager::getExpansionRange(), GetFullTypeForDeclarator(), clang::SourceManager::getImmediateMacroCallerLoc(), GetMappedTokenLoc(), clang::FixItRewriter::HandleDiagnostic(), handleObjCOwnershipTypeAttr(), retrieveMacroLocation(), and rewriteToNumberLiteral().

getCharRange() [1/2]

getCharRange() [2/2]

Definition at line 270 of file SourceLocation.h.

References CharSourceRange().

Referenced by clang::Sema::ActOnStringLiteral(), clang::transformer::after(), clang::format::JavaScriptImportSorter::analyze(), clang::format::LeftRightQualifierAlignmentFixer::analyzeRight(), applyRewrite(), clang::transformer::before(), clang::tooling::convertChangesToFileReplacements(), convertTokenRangeToCharRange(), CreateIfFixit(), clang::FixItHint::CreateInsertion(), clang::FixItHint::CreateInsertionFromRange(), diagnoseObjCLiteralComparison(), diagnoseXorMisusedAsPow(), DoEmitAvailabilityWarning(), GenerateFixForUnusedDecl(), clang::Lexer::getAsCharRange(), getCharRange(), clang::getExprText(), clang::edit::Commit::Edit::getFileRange(), DerefSimplePtrArithFixableGadget::getFixits(), clang::edit::Commit::Edit::getInsertFromRange(), getLiteralInfo(), clang::MacroExpansionContext::getOriginalText(), getRange(), getRangeForSplitTokens(), clang::getRangeText(), clang::format::insertQualifierAfter(), clang::format::insertQualifierBefore(), clang::format::Environment::make(), makeCharRange(), MakeCharSourceRange(), makeRangeFromFileLocs(), clang::transformer::merge(), clang::transformer::noopEdit(), clang::format::IntegerLiteralSeparatorFixer::process(), clang::format::NumericLiteralCaseFixer::process(), clang::format::removeToken(), rewriteToArraySubscriptSet(), rewriteToDictionaryLiteral(), rewriteToDictionarySubscriptSet(), rewriteToSubscriptGetCommon(), and clang::format::rotateTokens().

getEnd()

Definition at line 289 of file SourceLocation.h.

Referenced by clang::internal::anyConflict(), createTextRegion(), clang::TextDiagnostic::emitDiagnosticLoc(), clang::markup::EmitRange(), clang::SourceLocExpr::EvaluateInContext(), findLinesForRange(), getEntityEndLoc(), clang::SourceManager::getExpansionRange(), clang::SourceManager::getExpansionRange(), clang::SourceManager::getExpansionRange(), GetMappedTokenLoc(), clang::FixItRewriter::HandleDiagnostic(), clang::tooling::maybeExtendRange(), clang::edit::Commit::replaceWithInner(), retrieveMacroLocation(), and rewriteToNumberLiteral().

getTokenRange() [1/2]

getTokenRange() [2/2]

Definition at line 266 of file SourceLocation.h.

References CharSourceRange().

Referenced by clang::transformer::after(), AnalyzeImplicitConversions(), clang::Sema::CheckConversionDeclarator(), clang::SemaCodeCompletion::CodeCompleteMemberReferenceExpr(), constructDebugPieceForTrackedCondition(), clang::FixItHint::CreateRemoval(), clang::tooling::createRenameAtomicChanges(), clang::FixItHint::CreateReplacement(), DiagnoseBaseOrMemInitializerOrder(), diagnoseXorMisusedAsPow(), clang::tooling::getAssociatedRange(), GetDefaultValueString(), clang::tooling::getExtendedRange(), getLiteralInfo(), getRangeForSplitTokens(), clang::Rewriter::getRangeSize(), clang::Rewriter::getRewrittenText(), clang::tooling::fixit::internal::getSourceRange(), clang::tooling::fixit::internal::getSourceRange(), clang::tooling::fixit::internal::getSourceRange(), clang::tooling::getText(), getTokenRange(), clang::Rewriter::IncreaseIndentation(), clang::edit::Commit::insertFromRange(), clang::edit::Commit::insertWrap(), clang::tooling::maybeExtendRange(), clang::transformer::member(), clang::transformer::merge(), clang::transformer::name(), clang::transformer::node(), clang::operator<<(), clang::operator<<(), clang::operator<<(), clang::ento::ConditionBRVisitor::patternMatch(), printExprAsWritten(), clang::edit::Commit::remove(), clang::edit::Commit::replace(), clang::tooling::Replacement::Replacement(), clang::tooling::replaceStmtWithStmt(), clang::tooling::replaceStmtWithText(), clang::edit::Commit::replaceWithInner(), rewriteToArraySubscriptSet(), rewriteToDictionaryLiteral(), rewriteToDictionarySubscriptSet(), rewriteToNumberLiteral(), rewriteToSubscriptGetCommon(), clang::tooling::ReplaceNodeWithTemplate::run(), clang::tooling::ReplaceStmtWithText::run(), and clang::ConversionFixItGenerator::tryToFixConversion().

isCharRange()

bool clang::CharSourceRange::isCharRange ( ) const inline

isInvalid()

bool clang::CharSourceRange::isInvalid ( ) const inline

isTokenRange()

bool clang::CharSourceRange::isTokenRange ( ) const inline

isValid()

bool clang::CharSourceRange::isValid ( ) const inline

setBegin()

setEnd()

setTokenRange()

void clang::CharSourceRange::setTokenRange ( bool TR) inline

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