13#ifndef LLVM_CLANG_AST_TEMPLATEARGUMENTVISITOR_H
14#define LLVM_CLANG_AST_TEMPLATEARGUMENTVISITOR_H
20namespace templateargumentvisitor {
23template <
template <
typename>
class Ref,
typename ImplClass,
24 typename RetTy = void,
typename... ParamTys>
27#define REF(CLASS) typename Ref<CLASS>::type
28#define DISPATCH(NAME) \
29 case TemplateArgument::NAME: \
30 return static_cast<ImplClass *>(this)->Visit##NAME##TemplateArgument( \
31 TA, std::forward<ParamTys>(P)...)
46 llvm_unreachable(
"TemplateArgument is not covered in switch!");
52#define VISIT_METHOD(CATEGORY) \
53 RetTy Visit##CATEGORY##TemplateArgument(REF(TemplateArgument) TA, \
55 return static_cast<ImplClass *>(this)->VisitTemplateArgument( \
56 TA, std::forward<ParamTys>(P)...); \
85template <
typename ImplClass,
typename RetTy = void,
typename... ParamTys>
88 RetTy, ParamTys...> {};
94template <
typename ImplClass,
typename RetTy = void,
typename... ParamTys>
97 RetTy, ParamTys...> {};
A simple visitor class that helps create template argument visitors.
A simple visitor class that helps create template argument visitors.
Represents a template argument.
ArgKind getKind() const
Return the kind of stored template argument.
The base class of the type hierarchy.
A simple visitor class that helps create template argument visitors.
RetTy Visit(REF(TemplateArgument) TA, ParamTys... P)
VISIT_METHOD(TemplateExpansion)
RetTy VisitTemplateArgument(REF(TemplateArgument), ParamTys...)
VISIT_METHOD(Declaration)
VISIT_METHOD(StructuralValue)
The JSON file list parser is used to communicate input to InstallAPI.