class CharSourceRange
Declaration
class CharSourceRange { /* full declaration omitted */ };
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.
Declared at: clang/include/clang/Basic/SourceLocation.h:253
Member Variables
- private clang::SourceRange Range
- private bool IsTokenRange = false
Method Overview
- public CharSourceRange()
- public CharSourceRange(clang::SourceRange R, bool ITR)
- public clang::SourceRange getAsRange() const
- public clang::SourceLocation getBegin() const
- public static clang::CharSourceRange getCharRange(clang::SourceRange R)
- public static clang::CharSourceRange getCharRange(clang::SourceLocation B, clang::SourceLocation E)
- public clang::SourceLocation getEnd() const
- public static clang::CharSourceRange getTokenRange(clang::SourceRange R)
- public static clang::CharSourceRange getTokenRange(clang::SourceLocation B, clang::SourceLocation E)
- public bool isCharRange() const
- public bool isInvalid() const
- public bool isTokenRange() const
- public bool isValid() const
- public void setBegin(clang::SourceLocation b)
- public void setEnd(clang::SourceLocation e)
- public void setTokenRange(bool TR)
Methods
¶CharSourceRange()
CharSourceRange()
Declared at: clang/include/clang/Basic/SourceLocation.h:258
¶CharSourceRange(clang::SourceRange R, bool ITR)
CharSourceRange(clang::SourceRange R, bool ITR)
Declared at: clang/include/clang/Basic/SourceLocation.h:259
Parameters
- clang::SourceRange R
- bool ITR
¶clang::SourceRange getAsRange() const
clang::SourceRange getAsRange() const
Declared at: clang/include/clang/Basic/SourceLocation.h:285
¶clang::SourceLocation getBegin() const
clang::SourceLocation getBegin() const
Declared at: clang/include/clang/Basic/SourceLocation.h:283
¶static clang::CharSourceRange getCharRange(
clang::SourceRange R)
static clang::CharSourceRange getCharRange(
clang::SourceRange R)
Declared at: clang/include/clang/Basic/SourceLocation.h:265
Parameters
¶static clang::CharSourceRange getCharRange(
clang::SourceLocation B,
clang::SourceLocation E)
static clang::CharSourceRange getCharRange(
clang::SourceLocation B,
clang::SourceLocation E)
Declared at: clang/include/clang/Basic/SourceLocation.h:273
Parameters
¶clang::SourceLocation getEnd() const
clang::SourceLocation getEnd() const
Declared at: clang/include/clang/Basic/SourceLocation.h:284
¶static clang::CharSourceRange getTokenRange(
clang::SourceRange R)
static clang::CharSourceRange getTokenRange(
clang::SourceRange R)
Declared at: clang/include/clang/Basic/SourceLocation.h:261
Parameters
¶static clang::CharSourceRange getTokenRange(
clang::SourceLocation B,
clang::SourceLocation E)
static clang::CharSourceRange getTokenRange(
clang::SourceLocation B,
clang::SourceLocation E)
Declared at: clang/include/clang/Basic/SourceLocation.h:269
Parameters
¶bool isCharRange() const
bool isCharRange() const
Declared at: clang/include/clang/Basic/SourceLocation.h:281
¶bool isInvalid() const
bool isInvalid() const
Declared at: clang/include/clang/Basic/SourceLocation.h:292
¶bool isTokenRange() const
bool isTokenRange() const
Description
Return true if the end of this range specifies the start of the last token. Return false if the end of this range specifies the last character in the range.
Declared at: clang/include/clang/Basic/SourceLocation.h:280
¶bool isValid() const
bool isValid() const
Declared at: clang/include/clang/Basic/SourceLocation.h:291
¶void setBegin(clang::SourceLocation b)
void setBegin(clang::SourceLocation b)
Declared at: clang/include/clang/Basic/SourceLocation.h:287
Parameters
¶void setEnd(clang::SourceLocation e)
void setEnd(clang::SourceLocation e)
Declared at: clang/include/clang/Basic/SourceLocation.h:288
Parameters
¶void setTokenRange(bool TR)
void setTokenRange(bool TR)
Declared at: clang/include/clang/Basic/SourceLocation.h:289
Parameters
- bool TR