struct ArgumentAdaptingMatcherFunc

Declaration

template <
    template <typename ToArg, typename FromArg>
    class... ArgumentAdapterT,
    typename FromTypes =
        clang::ast_matchers::internal::AdaptativeDefaultFromTypes,
    typename ToTypes =
        clang::ast_matchers::internal::AdaptativeDefaultToTypes>
struct ArgumentAdaptingMatcherFunc { /* full declaration omitted */ };

Description

Converts a \c Matcher<T> to a matcher of desired type \c To by "adapting" a \c To into a \c T. The \c ArgumentAdapterT argument specifies how the adaptation is done. For example:\c ArgumentAdaptingMatcher<HasMatcher, T>(InnerMatcher); Given that \c InnerMatcher is of type \c Matcher<T>, this returns a matcher that is convertible into any matcher of type \c To by constructing\c HasMatcher<To, T>(InnerMatcher). If a matcher does not need knowledge about the inner type, prefer to use PolymorphicMatcher.

Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:1497

Templates

template class ArgumentAdapterT
FromTypes = clang::ast_matchers::internal::AdaptativeDefaultFromTypes
ToTypes = clang::ast_matchers::internal::AdaptativeDefaultToTypes

Method Overview

  • public template <typename T>static ArgumentAdaptingMatcherFuncAdaptor<ArgumentAdapterT, T, ToTypes> create(const Matcher<T> & InnerMatcher)

Methods

ΒΆtemplate <typename T>
static ArgumentAdaptingMatcherFuncAdaptor<
    ArgumentAdapterT,
    T,
    ToTypes>
create(const Matcher<T>& InnerMatcher)

Declared at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:1500

Templates

T

Parameters

const Matcher<T>& InnerMatcher