clang  12.0.0git
Namespaces | Functions
SourceCode.h File Reference
#include "clang/AST/ASTContext.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/TokenKinds.h"
Include dependency graph for SourceCode.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 clang
 Dataflow Directional Tag Classes.
 
 clang::tooling
 

Functions

CharSourceRange clang::tooling::maybeExtendRange (CharSourceRange Range, tok::TokenKind Terminator, ASTContext &Context)
 Extends Range to include the token Terminator, if it immediately follows the end of the range. More...
 
template<typename T >
CharSourceRange clang::tooling::getExtendedRange (const T &Node, tok::TokenKind Next, ASTContext &Context)
 Returns the source range spanning the node, extended to include Next, if it immediately follows Node. More...
 
CharSourceRange clang::tooling::getAssociatedRange (const Decl &D, ASTContext &Context)
 Returns the logical source range of the node extended to include associated comments and whitespace before and after the node, and associated terminators. More...
 
StringRef clang::tooling::getText (CharSourceRange Range, const ASTContext &Context)
 Returns the source-code text in the specified range. More...
 
template<typename T >
StringRef clang::tooling::getText (const T &Node, const ASTContext &Context)
 Returns the source-code text corresponding to Node. More...
 
template<typename T >
StringRef clang::tooling::getExtendedText (const T &Node, tok::TokenKind Next, ASTContext &Context)
 Returns the source text of the node, extended to include Next, if it immediately follows the node. More...
 
llvm::Error clang::tooling::validateEditRange (const CharSourceRange &Range, const SourceManager &SM)
 Determines whether Range is one that can be edited by a rewrite; generally, one that starts and ends within a particular file. More...
 
llvm::Optional< CharSourceRangeclang::tooling::getRangeForEdit (const CharSourceRange &EditRange, const SourceManager &SM, const LangOptions &LangOpts)
 Attempts to resolve the given range to one that can be edited by a rewrite; generally, one that starts and ends within a particular file. More...
 
llvm::Optional< CharSourceRange > clang::tooling::getRangeForEdit (const CharSourceRange &EditRange, const ASTContext &Context)