13 #ifndef LLVM_CLANG_AST_TYPELOCVISITOR_H
14 #define LLVM_CLANG_AST_TYPELOCVISITOR_H
18 #include "llvm/Support/ErrorHandling.h"
22 #define DISPATCH(CLASSNAME) \
23 return static_cast<ImplClass*>(this)-> \
24 Visit##CLASSNAME(TyLoc.castAs<CLASSNAME>())
26 template<
typename ImplClass,
typename RetTy=
void>
31 #define ABSTRACT_TYPELOC(CLASS, PARENT)
32 #define TYPELOC(CLASS, PARENT) \
33 case TypeLoc::CLASS: DISPATCH(CLASS##TypeLoc);
34 #include "clang/AST/TypeLocNodes.def"
36 llvm_unreachable(
"unexpected type loc class!");
41 #define ABSTRACT_TYPELOC(CLASS, PARENT)
42 #define TYPELOC(CLASS, PARENT) \
43 case TypeLoc::CLASS: DISPATCH(CLASS##TypeLoc);
44 #include "clang/AST/TypeLocNodes.def"
46 llvm_unreachable(
"unexpected type loc class!");
49 #define TYPELOC(CLASS, PARENT) \
50 RetTy Visit##CLASS##TypeLoc(CLASS##TypeLoc TyLoc) { \
53 #include "clang/AST/TypeLocNodes.def"
62 #endif // LLVM_CLANG_AST_TYPELOCVISITOR_H
RetTy Visit(TypeLoc TyLoc)
TypeLocClass getTypeLocClass() const
Base wrapper for a particular "section" of type source info.
Wrapper of type source information for a type with no direct qualifiers.
Defines the clang::TypeLoc interface and its subclasses.
TypeLocClass getTypeLocClass() const
RetTy Visit(UnqualTypeLoc TyLoc)
RetTy VisitTypeLoc(TypeLoc TyLoc)