clang  9.0.0svn
Functions
clang::tooling::stencil Namespace Reference

Functions

template<typename... Ts>
Stencil cat (Ts &&... Parts)
 Convenience wrapper for Stencil::cat that can be imported with a using decl. More...
 
StencilPart text (llvm::StringRef Text)
 
StencilPart selection (RangeSelector Selector)
 
StencilPart node (llvm::StringRef Id)
 
StencilPart sNode (llvm::StringRef Id)
 Variant of node() that identifies the node as a statement, for purposes of deciding whether to include any trailing semicolon. More...
 
StencilPart dPrint (llvm::StringRef Id)
 For debug use only; semantics are not guaranteed. More...
 

Function Documentation

◆ cat()

template<typename... Ts>
Stencil clang::tooling::stencil::cat ( Ts &&...  Parts)

◆ dPrint()

StencilPart clang::tooling::stencil::dPrint ( llvm::StringRef  Id)

For debug use only; semantics are not guaranteed.

Returns
the string resulting from calling the node's print() method.

Referenced by selection(), and sNode().

◆ node()

StencilPart clang::tooling::stencil::node ( llvm::StringRef  Id)
inline
Returns
the source corresponding to the identified node. FIXME: Deprecated. Write selection(node(Id)) instead.

Definition at line 152 of file Stencil.h.

References clang::tooling::node(), and selection().

◆ selection()

StencilPart clang::tooling::stencil::selection ( RangeSelector  Selector)
Returns
the source corresponding to the selected range.

Definition at line 169 of file Stencil.cpp.

References dPrint(), and Id.

Referenced by cat(), StencilPartImpl< T >::isEqual(), node(), and sNode().

◆ sNode()

StencilPart clang::tooling::stencil::sNode ( llvm::StringRef  Id)
inline

Variant of node() that identifies the node as a statement, for purposes of deciding whether to include any trailing semicolon.

Only relevant for Expr nodes, which, by default, are not considered as statements.

Returns
the source corresponding to the identified node, considered as a statement. FIXME: Deprecated. Write selection(statement(Id)) instead.

Definition at line 162 of file Stencil.h.

References dPrint(), Id, selection(), and clang::tooling::statement().

◆ text()

StencilPart clang::tooling::stencil::text ( llvm::StringRef  Text)
Returns
exactly the text provided.

Referenced by clang::tooling::Stencil::eval(), and StencilPartImpl< T >::isEqual().