clang  9.0.0
Public Member Functions | Static Public Member Functions | Friends | List of all members
clang::tooling::Stencil Class Reference

A sequence of code fragments, references to parameters and code-generation operations that together can be evaluated to (a fragment of) source code, given a match result. More...

#include "clang/Tooling/Refactoring/Stencil.h"

Public Member Functions

 Stencil ()=default
 
void append (Stencil OtherStencil)
 Appends data from a OtherStencil to this stencil. More...
 
llvm::Expected< std::string > eval (const ast_matchers::MatchFinder::MatchResult &Match) const
 
llvm::Expected< std::string > operator() (const ast_matchers::MatchFinder::MatchResult &Result) const
 

Static Public Member Functions

template<typename... Ts>
static Stencil cat (Ts &&... Parts)
 Composes a stencil from a series of parts. More...
 

Friends

bool operator== (const Stencil &A, const Stencil &B)
 

Detailed Description

A sequence of code fragments, references to parameters and code-generation operations that together can be evaluated to (a fragment of) source code, given a match result.

Definition at line 95 of file Stencil.h.

Constructor & Destructor Documentation

◆ Stencil()

clang::tooling::Stencil::Stencil ( )
default

Member Function Documentation

◆ append()

void Stencil::append ( Stencil  OtherStencil)

Appends data from a OtherStencil to this stencil.

Definition at line 151 of file Stencil.cpp.

◆ cat()

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

Composes a stencil from a series of parts.

Definition at line 100 of file Stencil.h.

Referenced by clang::tooling::stencil::cat().

◆ eval()

llvm::Expected< std::string > Stencil::eval ( const ast_matchers::MatchFinder::MatchResult Match) const

Definition at line 157 of file Stencil.cpp.

References clang::tooling::stencil::text(), and Text.

◆ operator()()

llvm::Expected<std::string> clang::tooling::Stencil::operator() ( const ast_matchers::MatchFinder::MatchResult Result) const
inline

Friends And Related Function Documentation

◆ operator==

bool operator== ( const Stencil A,
const Stencil B 
)
friend

Definition at line 131 of file Stencil.h.


The documentation for this class was generated from the following files: