14 #ifndef LLVM_CLANG_AST_ATTRVISITOR_H 15 #define LLVM_CLANG_AST_ATTRVISITOR_H 21 namespace attrvisitor {
24 template <
template <
typename>
class Ptr,
typename ImplClass,
25 typename RetTy = void,
class... ParamTys>
28 #define PTR(CLASS) typename Ptr<CLASS>::type 29 #define DISPATCH(NAME) \ 30 return static_cast<ImplClass *>(this)->Visit##NAME(static_cast<PTR(NAME)>(A)) 38 #include "clang/Basic/AttrList.inc" 40 llvm_unreachable(
"Attr that isn't part of AttrList.inc!");
46 RetTy Visit##NAME##Attr(PTR(NAME##Attr) A) { DISPATCH(Attr); } 47 #include "clang/Basic/AttrList.inc" 61 template <
typename ImplClass,
typename RetTy = void,
typename... ParamTys>
69 template <
typename ImplClass,
typename RetTy = void,
typename... ParamTys>
76 #endif // LLVM_CLANG_AST_ATTRVISITOR_H A simple visitor class that helps create attribute visitors.
Dataflow Directional Tag Classes.
RetTy VisitAttr(PTR(Attr))
A simple visitor class that helps create attribute visitors.
attr::Kind getKind() const
A simple visitor class that helps create attribute visitors.
Attr - This represents one attribute.