clang API Documentation

Classes | Namespaces | Defines | Typedefs | Functions
Type.cpp File Reference
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
#include "clang/AST/CharUnits.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/Expr.h"
#include "clang/AST/PrettyPrinter.h"
#include "clang/AST/Type.h"
#include "clang/AST/TypeVisitor.h"
#include "clang/Basic/Specifiers.h"
#include "llvm/ADT/APSInt.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include "clang/AST/TypeNodes.def"
Include dependency graph for Type.cpp:

Go to the source code of this file.

Classes

class  clang::TypePropertyCache< Private >

Namespaces

namespace  clang

Defines

#define ABSTRACT_TYPE(Class, Parent)
#define TYPE(Class, Parent)
#define ABSTRACT_TYPE(Class, Parent)
#define TYPE(Class, Parent)
#define ABSTRACT_TYPE(Class, Parent)
#define TYPE(Class, Parent)
#define ABSTRACT_TYPE(Class, Parent)
#define TYPE(Class, Parent)
#define ABSTRACT_TYPE(Class, Parent)
#define TYPE(Class, Parent)
#define ABSTRACT_TYPE(Derived, Base)
#define TYPE(Derived, Base)   case Derived: return #Derived;
#define TYPE(Class, Base)
#define NON_CANONICAL_TYPE(Class, Base)   case Type::Class:
#define TYPE(Class, Base)
#define DEPENDENT_TYPE(Class, Base)   case Type::Class:
#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base)   case Type::Class:
#define TYPE(Class, Base)
#define NON_CANONICAL_TYPE(Class, Base)   case Type::Class:
#define TYPE(Class, Base)
#define DEPENDENT_TYPE(Class, Base)   case Type::Class:
#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base)   case Type::Class:

Typedefs

typedef TypePropertyCache
< Private > 
Cache

Functions

template<typename T >
static const T * getAsSugar (const Type *Cur)
 This will check for a T (which should be a Type which can act as sugar, such as a TypedefType) by removing any existing sugar until it reaches a T or a non-sugared type.
static TagDeclgetInterestingTagDecl (TagDecl *decl)
static CachedProperties computeCachedProperties (const Type *T)
static LinkageInfo computeLinkageInfo (QualType T)
static LinkageInfo computeLinkageInfo (const Type *T)

Define Documentation

#define ABSTRACT_TYPE (   Class,
  Parent 
)
#define ABSTRACT_TYPE (   Class,
  Parent 
)
#define ABSTRACT_TYPE (   Class,
  Parent 
)
#define ABSTRACT_TYPE (   Class,
  Parent 
)
#define ABSTRACT_TYPE (   Class,
  Parent 
)
#define ABSTRACT_TYPE (   Derived,
  Base 
)
#define DEPENDENT_TYPE (   Class,
  Base 
)    case Type::Class:
#define DEPENDENT_TYPE (   Class,
  Base 
)    case Type::Class:
#define NON_CANONICAL_TYPE (   Class,
  Base 
)    case Type::Class:
#define NON_CANONICAL_TYPE (   Class,
  Base 
)    case Type::Class:
#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE (   Class,
  Base 
)    case Type::Class:
#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE (   Class,
  Base 
)    case Type::Class:
#define TYPE (   Class,
  Parent 
)
Value:
case Type::Class: { \
    const Class##Type *ty = cast<Class##Type>(this); \
    if (!ty->isSugared()) return QualType(ty, 0); \
    return ty->desugar(); \
  }
#define TYPE (   Class,
  Parent 
)
Value:
case Type::Class: { \
      const Class##Type *Ty = cast<Class##Type>(CurTy); \
      if (!Ty->isSugared()) \
        return SplitQualType(Ty, Qs); \
      Cur = Ty->desugar(); \
      break; \
    }
#define TYPE (   Class,
  Parent 
)
Value:
case Type::Class: { \
      const Class##Type *ty = cast<Class##Type>(split.Ty); \
      if (!ty->isSugared()) goto done; \
      next = ty->desugar(); \
      break; \
    }
#define TYPE (   Class,
  Parent 
)
Value:
case Type::Class: { \
      const Class##Type *Ty = cast<Class##Type>(Cur); \
      if (!Ty->isSugared()) return 0; \
      Cur = Ty->desugar().getTypePtr(); \
      break; \
    }
#define TYPE (   Class,
  Parent 
)
Value:
case Class: { \
      const Class##Type *Ty = cast<Class##Type>(Cur); \
      if (!Ty->isSugared()) return Cur; \
      Cur = Ty->desugar().getTypePtr(); \
      break; \
    }
#define TYPE (   Derived,
  Base 
)    case Derived: return #Derived;
#define TYPE (   Class,
  Base 
)
#define TYPE (   Class,
  Base 
)
#define TYPE (   Class,
  Base 
)
#define TYPE (   Class,
  Base 
)

Typedef Documentation

typedef TypePropertyCache<Private> Cache

Definition at line 2153 of file Type.cpp.


Function Documentation

static CachedProperties computeCachedProperties ( const Type T) [static]
static LinkageInfo computeLinkageInfo ( QualType  T) [static]
static LinkageInfo computeLinkageInfo ( const Type T) [static]
template<typename T >
static const T* getAsSugar ( const Type Cur) [static]

This will check for a T (which should be a Type which can act as sugar, such as a TypedefType) by removing any existing sugar until it reaches a T or a non-sugared type.

Definition at line 315 of file Type.cpp.

References clang::Type::getTypeClass().

static TagDecl* getInterestingTagDecl ( TagDecl decl) [static]