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
- private const Derived * asDerived() const
- private static bool classofType(const clang::Type * Ty)
- public void copyLocal(Derived other)
- protected void * getExtraLocalData() const
- protected unsigned int getExtraLocalDataAlignment() const
- protected unsigned int getExtraLocalDataSize() const
- protected clang::ConcreteTypeLoc::HasNoInnerType getInnerType() const
- protected clang::TypeLoc getInnerTypeLoc() const
- private unsigned int getInnerTypeSize() const
- private unsigned int getInnerTypeSize(clang::ConcreteTypeLoc::HasNoInnerType _) const
- private unsigned int getInnerTypeSize(clang::QualType _) const
- protected LocalData * getLocalData() const
- public unsigned int getLocalDataAlignment() const
- public unsigned int getLocalDataSize() const
- private unsigned int getNextTypeAlign(clang::QualType T) const
- private unsigned int getNextTypeAlign(clang::ConcreteTypeLoc::HasNoInnerType _) const
- private unsigned int getNextTypeAlign() const
- private clang::TypeLoc getNextTypeLoc(clang::ConcreteTypeLoc::HasNoInnerType _) const
- private clang::TypeLoc getNextTypeLoc(clang::QualType T) const
- public clang::TypeLoc getNextTypeLoc() const
- protected void * getNonLocalData() const
- public const TypeClass * getTypePtr() const
- private static bool isKind(const clang::TypeLoc & TL)
Methods
¶const Derived* asDerived() const
const Derived* asDerived() const
Declared at: clang/include/clang/AST/TypeLoc.h:364
¶static bool classofType(const clang::Type* Ty)
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)
void copyLocal(Derived other)
Declared at: clang/include/clang/AST/TypeLoc.h:391
Parameters
- Derived other
¶void* getExtraLocalData() const
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
unsigned int getExtraLocalDataAlignment() const
Declared at: clang/include/clang/AST/TypeLoc.h:418
¶unsigned int getExtraLocalDataSize() const
unsigned int getExtraLocalDataSize() const
Declared at: clang/include/clang/AST/TypeLoc.h:414
¶clang::ConcreteTypeLoc::HasNoInnerType
getInnerType() const
clang::ConcreteTypeLoc::HasNoInnerType
getInnerType() const
Declared at: clang/include/clang/AST/TypeLoc.h:444
¶clang::TypeLoc getInnerTypeLoc() const
clang::TypeLoc getInnerTypeLoc() const
Declared at: clang/include/clang/AST/TypeLoc.h:446
¶unsigned int getInnerTypeSize() const
unsigned int getInnerTypeSize() const
Declared at: clang/include/clang/AST/TypeLoc.h:451
¶unsigned int getInnerTypeSize(
clang::ConcreteTypeLoc::HasNoInnerType _)
const
unsigned int getInnerTypeSize(
clang::ConcreteTypeLoc::HasNoInnerType _)
const
Declared at: clang/include/clang/AST/TypeLoc.h:455
Parameters
¶unsigned int getInnerTypeSize(
clang::QualType _) const
unsigned int getInnerTypeSize(
clang::QualType _) const
Declared at: clang/include/clang/AST/TypeLoc.h:459
Parameters
¶LocalData* getLocalData() const
LocalData* getLocalData() const
Declared at: clang/include/clang/AST/TypeLoc.h:422
¶unsigned int getLocalDataAlignment() const
unsigned int getLocalDataAlignment() const
Declared at: clang/include/clang/AST/TypeLoc.h:378
¶unsigned int getLocalDataSize() const
unsigned int getLocalDataSize() const
Declared at: clang/include/clang/AST/TypeLoc.h:383
¶unsigned int getNextTypeAlign(
clang::QualType T) const
unsigned int getNextTypeAlign(
clang::QualType T) const
Declared at: clang/include/clang/AST/TypeLoc.h:471
Parameters
¶unsigned int getNextTypeAlign(
clang::ConcreteTypeLoc::HasNoInnerType _)
const
unsigned int getNextTypeAlign(
clang::ConcreteTypeLoc::HasNoInnerType _)
const
Declared at: clang/include/clang/AST/TypeLoc.h:467
Parameters
¶unsigned int getNextTypeAlign() const
unsigned int getNextTypeAlign() const
Declared at: clang/include/clang/AST/TypeLoc.h:463
¶clang::TypeLoc getNextTypeLoc(
clang::ConcreteTypeLoc::HasNoInnerType _)
const
clang::TypeLoc getNextTypeLoc(
clang::ConcreteTypeLoc::HasNoInnerType _)
const
Declared at: clang/include/clang/AST/TypeLoc.h:475
Parameters
¶clang::TypeLoc getNextTypeLoc(
clang::QualType T) const
clang::TypeLoc getNextTypeLoc(
clang::QualType T) const
Declared at: clang/include/clang/AST/TypeLoc.h:477
Parameters
¶clang::TypeLoc getNextTypeLoc() const
clang::TypeLoc getNextTypeLoc() const
Declared at: clang/include/clang/AST/TypeLoc.h:405
¶void* getNonLocalData() const
void* getNonLocalData() const
Declared at: clang/include/clang/AST/TypeLoc.h:436
¶const TypeClass* getTypePtr() const
const TypeClass* getTypePtr() const
Declared at: clang/include/clang/AST/TypeLoc.h:409
¶static bool isKind(const clang::TypeLoc& TL)
static bool isKind(const clang::TypeLoc& TL)
Declared at: clang/include/clang/AST/TypeLoc.h:368
Parameters
- const clang::TypeLoc& TL