clang 17.0.0git
Classes | Namespaces | Typedefs | Functions
MatchConsumer.h File Reference
#include "clang/AST/ASTTypeTraits.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
Include dependency graph for MatchConsumer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  clang::transformer::MatchComputation< T >
 A failable computation over nodes bound by AST matchers, with (limited) reflection via the toString method. More...
 

Namespaces

namespace  clang
 
namespace  clang::transformer
 

Typedefs

template<typename T >
using clang::transformer::MatchConsumer = std::function< Expected< T >(const ast_matchers::MatchFinder::MatchResult &)>
 A failable computation over nodes bound by AST matchers.
 

Functions

llvm::Error clang::transformer::notBoundError (llvm::StringRef Id)
 Creates an error that signals that a MatchConsumer expected a certain node to be bound by AST matchers, but it was not actually bound.
 
template<typename T >
MatchConsumer< T > clang::transformer::ifBound (std::string ID, MatchConsumer< T > TrueC, MatchConsumer< T > FalseC)
 Chooses between the two consumers, based on whether ID is bound in the match.