clang 18.0.0git
clang::tooling::fixit::internal Namespace Reference


StringRef getText (CharSourceRange Range, const ASTContext &Context)
CharSourceRange getSourceRange (const SourceRange &Range)
 Returns the token CharSourceRange corresponding to Range.
CharSourceRange getSourceRange (const SourceLocation &Loc)
 Returns the CharSourceRange of the token at Location Loc.
template<typename T >
CharSourceRange getSourceRange (const T &Node)
 Returns the CharSourceRange of an given Node.

Function Documentation

◆ getSourceRange() [1/3]

CharSourceRange clang::tooling::fixit::internal::getSourceRange ( const SourceLocation Loc)

Returns the CharSourceRange of the token at Location Loc.

Definition at line 37 of file FixIt.h.

References clang::CharSourceRange::getTokenRange().

◆ getSourceRange() [2/3]

CharSourceRange clang::tooling::fixit::internal::getSourceRange ( const SourceRange Range)

◆ getSourceRange() [3/3]

template<typename T >
CharSourceRange clang::tooling::fixit::internal::getSourceRange ( const T &  Node)

Returns the CharSourceRange of an given Node.

Node is typically a 'Stmt', 'Expr' or a 'Decl'.

Definition at line 43 of file FixIt.h.

References clang::CharSourceRange::getTokenRange(), and Node.

◆ getText()

StringRef clang::tooling::fixit::internal::getText ( CharSourceRange  Range,
const ASTContext Context 

Definition at line 21 of file FixIt.cpp.

References clang::Lexer::getSourceText().

Referenced by clang::tooling::fixit::getText().