13 #ifndef LLVM_CLANG_AST_DECLVISITOR_H 14 #define LLVM_CLANG_AST_DECLVISITOR_H 23 #include "llvm/ADT/STLExtras.h" 24 #include "llvm/Support/ErrorHandling.h" 28 namespace declvisitor {
30 template<
template <
typename>
class Ptr,
typename ImplClass,
typename RetTy=
void>
33 #define PTR(CLASS) typename Ptr<CLASS>::type 34 #define DISPATCH(NAME, CLASS) \ 35 return static_cast<ImplClass*>(this)->Visit##NAME(static_cast<PTR(CLASS)>(D)) 39 #define DECL(DERIVED, BASE) \ 40 case Decl::DERIVED: DISPATCH(DERIVED##Decl, DERIVED##Decl); 41 #define ABSTRACT_DECL(DECL) 42 #include "clang/AST/DeclNodes.inc" 44 llvm_unreachable(
"Decl that isn't part of DeclNodes.inc!");
49 #define DECL(DERIVED, BASE) \ 50 RetTy Visit##DERIVED##Decl(PTR(DERIVED##Decl) D) { DISPATCH(BASE, BASE); } 51 #include "clang/AST/DeclNodes.inc" 65 template <
typename ImplClass,
typename RetTy =
void>
72 template <
typename ImplClass,
typename RetTy =
void>
78 #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.