13 #ifndef LLVM_CLANG_AST_DECLVISITOR_H
14 #define LLVM_CLANG_AST_DECLVISITOR_H
24 namespace declvisitor {
30 template<
template <
typename>
class Ptr,
typename ImplClass,
typename RetTy=
void>
34 #define PTR(CLASS) typename Ptr<CLASS>::type
35 #define DISPATCH(NAME, CLASS) \
36 return static_cast<ImplClass*>(this)->Visit##NAME(static_cast<PTR(CLASS)>(D))
40 #define DECL(DERIVED, BASE) \
41 case Decl::DERIVED: DISPATCH(DERIVED##Decl, DERIVED##Decl);
42 #define ABSTRACT_DECL(DECL)
43 #include "clang/AST/DeclNodes.inc"
45 llvm_unreachable(
"Decl that isn't part of DeclNodes.inc!");
50 #define DECL(DERIVED, BASE) \
51 RetTy Visit##DERIVED##Decl(PTR(DERIVED##Decl) D) { DISPATCH(BASE, BASE); }
52 #include "clang/AST/DeclNodes.inc"
66 template<
typename ImplClass,
typename RetTy=
void>
73 template<
typename ImplClass,
typename RetTy=
void>
79 #endif // LLVM_CLANG_AST_DECLVISITOR_H
Defines the C++ template declaration subclasses.
A simple visitor class that helps create declaration visitors.
This file defines OpenMP nodes for declarative directives.
A simple visitor class that helps create declaration visitors.
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).
RetTy VisitDecl(PTR(Decl) D)
A simple visitor class that helps create declaration visitors.