clang 20.0.0git
|
Represents a character-granular source range. More...
#include "clang/Basic/SourceLocation.h"
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 |
Static Public Member Functions | |
static CharSourceRange | getTokenRange (SourceRange R) |
static CharSourceRange | getCharRange (SourceRange R) |
static CharSourceRange | getTokenRange (SourceLocation B, SourceLocation E) |
static CharSourceRange | getCharRange (SourceLocation B, SourceLocation E) |
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 256 of file SourceLocation.h.
|
default |
Referenced by getCharRange(), and getTokenRange().
|
inline |
Definition at line 262 of file SourceLocation.h.
References Range.
|
inline |
Definition at line 288 of file SourceLocation.h.
References Range.
|
inline |
Definition at line 286 of file SourceLocation.h.
References Range.
Referenced by clang::Sema::ActOnGCCAsmStmt(), checkAllAtProps(), CheckMoveOnConstruction(), createTextRegion(), clang::Sema::DiagnoseAbsenceOfOverrideControl(), DiagnoseNullConversion(), DiagUninitUse(), clang::markup::EmitRange(), findLinesForRange(), clang::SourceManager::getExpansionRange(), GetFullTypeForDeclarator(), clang::SourceManager::getImmediateMacroCallerLoc(), GetMappedTokenLoc(), clang::FixItRewriter::HandleDiagnostic(), handleObjCOwnershipTypeAttr(), makeStandaloneRange(), and retrieveMacroLocation().
|
inlinestatic |
Definition at line