clang 10.0.0git

Functions
clang::tooling::fixit::internal Namespace Reference

## Functions
StringRef | getText (CharSourceRange Range, const ASTContext &Context)
| Returns the source-code text in the specified range. More...
CharSourceRange | getSourceRange (const SourceRange &Range)
| Returns the token CharSourceRange corresponding to `Range`. More...
CharSourceRange | getSourceRange (const SourceLocation &Loc)
| Returns the CharSourceRange of the token at Location `Loc`. More...
template<typename T >
CharSourceRange | getSourceRange (const T &Node)
| Returns the CharSourceRange of an given Node. More...

## Function Documentation

## ◆ getSourceRange() [1/3]

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

Returns the token CharSourceRange corresponding to `Range`.

Definition at line 32 of file FixIt.h.

References clang::CharSourceRange::getTokenRange().

Referenced by clang::tooling::fixit::createRemoval(), clang::tooling::fixit::createReplacement(), DiagnoseBitwisePrecedence(), clang::NestedNameSpecifierLoc::getBeginLoc(), clang::NestedNameSpecifierLoc::getEndLoc(), clang::TypeOfExprTypeLoc::getLocalSourceRange(), clang::TemplateArgumentLoc::getLocation(), clang::ast_type_traits::DynTypedNode::getMemoizationData(), clang::NestedNameSpecifierLoc::getOpaqueData(), clang::ObjCMethodCall::getSelector(), and clang::Stmt::setIsOMPStructuredBlock().

## ◆ getSourceRange() [2/3]

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

Returns the CharSourceRange of the token at Location `Loc`.

Definition at line 37 of file FixIt.h.

References clang::CharSourceRange::getTokenRange().

## ◆ 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().

## ◆ getText()

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

Returns the source-code text in the specified range.

Definition at line 21 of file FixIt.cpp.

Referenced by clang::tooling::getText(), and clang::transformer::name().