12#ifndef LLVM_CLANG_AST_TYPELOCVISITOR_H
13#define LLVM_CLANG_AST_TYPELOCVISITOR_H
16#include "llvm/Support/ErrorHandling.h"
20#define DISPATCH(CLASSNAME) \
21 return static_cast<ImplClass*>(this)-> \
22 Visit##CLASSNAME(TyLoc.castAs<CLASSNAME>())
24template<
typename ImplClass,
typename RetTy=
void>
29#define ABSTRACT_TYPELOC(CLASS, PARENT)
30#define TYPELOC(CLASS, PARENT) \
31 case TypeLoc::CLASS: DISPATCH(CLASS##TypeLoc);
32#include "clang/AST/TypeLocNodes.def"
34 llvm_unreachable(
"unexpected type loc class!");
39#define ABSTRACT_TYPELOC(CLASS, PARENT)
40#define TYPELOC(CLASS, PARENT) \
41 case TypeLoc::CLASS: DISPATCH(CLASS##TypeLoc);
42#include "clang/AST/TypeLocNodes.def"
44 llvm_unreachable(
"unexpected type loc class!");
47#define TYPELOC(CLASS, PARENT) \
48 RetTy Visit##CLASS##TypeLoc(CLASS##TypeLoc TyLoc) { \
51#include "clang/AST/TypeLocNodes.def"
Defines the clang::TypeLoc interface and its subclasses.
RetTy Visit(UnqualTypeLoc TyLoc)
RetTy Visit(TypeLoc TyLoc)
RetTy VisitTypeLoc(TypeLoc TyLoc)
Base wrapper for a particular "section" of type source info.
TypeLocClass getTypeLocClass() const
Wrapper of type source information for a type with no direct qualifiers.
TypeLocClass getTypeLocClass() const
The JSON file list parser is used to communicate input to InstallAPI.