class ConcreteTypeLoc

Declaration

template <class Base, class Derived, class TypeClass, class LocalData>
class ConcreteTypeLoc { /* full declaration omitted */ };

Description

A metaprogramming base class for TypeLoc classes which correspond to a particular Type subclass. It is accepted for a single TypeLoc class to correspond to multiple Type classes. TypeLocs with non-constant amounts of local data should override getExtraLocalDataSize(); getExtraLocalData() will then point to this extra memory. TypeLocs with an inner type should define QualType getInnerType() const and getInnerTypeLoc() will then point to this inner type's location data. A word about hierarchies: this template is not designed to be derived from multiple times in a hierarchy. It is also not designed to be used for classes where subtypes might provide different amounts of source information. It should be subclassed only at the deepest portion of the hierarchy where all children have identical source information; if that's an abstract type, then further descendents should inherit from InheritingConcreteTypeLoc instead.

Declared at: clang/include/clang/AST/TypeLoc.h:361

Templates

Base
a class from which to derive
Derived
the class deriving from this one
TypeClass
the concrete Type subclass associated with this location type
LocalData
the structure type of local location data for this type

Method Overview

Methods

const Derived* asDerived() const

Declared at: clang/include/clang/AST/TypeLoc.h:364

static bool classofType(const clang::Type* Ty)

Declared at: clang/include/clang/AST/TypeLoc.h:373

Parameters

const clang::Type* Ty

void copyLocal(Derived other)

Declared at: clang/include/clang/AST/TypeLoc.h:391

Parameters

Derived other

void* getExtraLocalData() const

Description

Gets a pointer past the Info structure; useful for classes with local data that can't be captured in the Info (e.g. because it's of variable size).

Declared at: clang/include/clang/AST/TypeLoc.h:429

unsigned int getExtraLocalDataAlignment() const

Declared at: clang/include/clang/AST/TypeLoc.h:418

unsigned int getExtraLocalDataSize() const

Declared at: clang/include/clang/AST/TypeLoc.h:414

clang::ConcreteTypeLoc::HasNoInnerType
getInnerType() const

Declared at: clang/include/clang/AST/TypeLoc.h:444

clang::TypeLoc getInnerTypeLoc() const

Declared at: clang/include/clang/AST/TypeLoc.h:446

unsigned int getInnerTypeSize() const

Declared at: clang/include/clang/AST/TypeLoc.h:451

unsigned int getInnerTypeSize(
    clang::ConcreteTypeLoc::HasNoInnerType _)
    const

Declared at: clang/include/clang/AST/TypeLoc.h:455

Parameters

clang::ConcreteTypeLoc::HasNoInnerType _

unsigned int getInnerTypeSize(
    clang::QualType _) const

Declared at: clang/include/clang/AST/TypeLoc.h:459

Parameters

clang::QualType _

LocalData* getLocalData() const

Declared at: clang/include/clang/AST/TypeLoc.h:422

unsigned int getLocalDataAlignment() const

Declared at: clang/include/clang/AST/TypeLoc.h:378

unsigned int getLocalDataSize() const

Declared at: clang/include/clang/AST/TypeLoc.h:383

unsigned int getNextTypeAlign(
    clang::QualType T) const

Declared at: clang/include/clang/AST/TypeLoc.h:471

Parameters

clang::QualType T

unsigned int getNextTypeAlign(
    clang::ConcreteTypeLoc::HasNoInnerType _)
    const

Declared at: clang/include/clang/AST/TypeLoc.h:467

Parameters

clang::ConcreteTypeLoc::HasNoInnerType _

unsigned int getNextTypeAlign() const

Declared at: clang/include/clang/AST/TypeLoc.h:463

clang::TypeLoc getNextTypeLoc(
    clang::ConcreteTypeLoc::HasNoInnerType _)
    const

Declared at: clang/include/clang/AST/TypeLoc.h:475

Parameters

clang::ConcreteTypeLoc::HasNoInnerType _

clang::TypeLoc getNextTypeLoc(
    clang::QualType T) const

Declared at: clang/include/clang/AST/TypeLoc.h:477

Parameters

clang::QualType T

clang::TypeLoc getNextTypeLoc() const

Declared at: clang/include/clang/AST/TypeLoc.h:405

void* getNonLocalData() const

Declared at: clang/include/clang/AST/TypeLoc.h:436

const TypeClass* getTypePtr() const

Declared at: clang/include/clang/AST/TypeLoc.h:409

static bool isKind(const clang::TypeLoc& TL)

Declared at: clang/include/clang/AST/TypeLoc.h:368

Parameters

const clang::TypeLoc& TL