14 #ifndef LLVM_CLANG_AST_DECLVISITOR_H 15 #define LLVM_CLANG_AST_DECLVISITOR_H 24 #include "llvm/ADT/STLExtras.h" 25 #include "llvm/Support/ErrorHandling.h" 29 namespace declvisitor {
31 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
Decl - This represents one declaration (or definition), e.g.
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.
Dataflow Directional Tag Classes.
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.