clang: include/clang/AST/TypeLocVisitor.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12#ifndef LLVM_CLANG_AST_TYPELOCVISITOR_H

13#define LLVM_CLANG_AST_TYPELOCVISITOR_H

14

16#include "llvm/Support/ErrorHandling.h"

17

19

20#define DISPATCH(CLASSNAME) \

21 return static_cast<ImplClass*>(this)-> \

22 Visit##CLASSNAME(TyLoc.castAs())

23

24template<typename ImplClass, typename RetTy=void>

26public:

29#define ABSTRACT_TYPELOC(CLASS, PARENT)

30#define TYPELOC(CLASS, PARENT) \

31 case TypeLoc::CLASS: DISPATCH(CLASS##TypeLoc);

32#include "clang/AST/TypeLocNodes.def"

33 }

34 llvm_unreachable("unexpected type loc class!");

35 }

36

39#define ABSTRACT_TYPELOC(CLASS, PARENT)

40#define TYPELOC(CLASS, PARENT) \

41 case TypeLoc::CLASS: DISPATCH(CLASS##TypeLoc);

42#include "clang/AST/TypeLocNodes.def"

43 }

44 llvm_unreachable("unexpected type loc class!");

45 }

46

47#define TYPELOC(CLASS, PARENT) \

48 RetTy Visit##CLASS##TypeLoc(CLASS##TypeLoc TyLoc) { \

49 DISPATCH(PARENT); \

50 }

51#include "clang/AST/TypeLocNodes.def"

52

54};

55

56#undef DISPATCH

57

58}

59

60#endif

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.