14 #ifndef LLVM_CLANG_AST_DECLVISITOR_H 15 #define LLVM_CLANG_AST_DECLVISITOR_H 24 #include "llvm/Support/ErrorHandling.h" 28 namespace declvisitor {
34 template<
template <
typename>
class Ptr,
typename ImplClass,
typename RetTy=
void>
37 #define PTR(CLASS) typename Ptr<CLASS>::type 38 #define DISPATCH(NAME, CLASS) \ 39 return static_cast<ImplClass*>(this)->Visit##NAME(static_cast<PTR(CLASS)>(D)) 43 #define DECL(DERIVED, BASE) \ 44 case Decl::DERIVED: DISPATCH(DERIVED##Decl, DERIVED##Decl); 45 #define ABSTRACT_DECL(DECL) 46 #include "clang/AST/DeclNodes.inc" 48 llvm_unreachable(
"Decl that isn't part of DeclNodes.inc!");
53 #define DECL(DERIVED, BASE) \ 54 RetTy Visit##DERIVED##Decl(PTR(DERIVED##Decl) D) { DISPATCH(BASE, BASE); } 55 #include "clang/AST/DeclNodes.inc" 69 template<
typename ImplClass,
typename RetTy =
void>
76 template<
typename ImplClass,
typename RetTy =
void>
82 #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.
const FunctionProtoType * T
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.