clang API Documentation

Classes | Public Member Functions | Protected Member Functions | Friends
clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData > Class Template Reference

#include <TypeLoc.h>

Inheritance diagram for clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >:
Inheritance graph
[legend]
Collaboration diagram for clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >:
Collaboration graph
[legend]

List of all members.

Classes

struct  HasNoInnerType

Public Member Functions

unsigned getLocalDataAlignment () const
unsigned getLocalDataSize () const
TypeLoc getNextTypeLoc () const
const TypeClass * getTypePtr () const

Protected Member Functions

unsigned getExtraLocalDataSize () const
unsigned getExtraLocalDataAlignment () const
LocalData * getLocalData () const
void * getExtraLocalData () const
void * getNonLocalData () const
HasNoInnerType getInnerType () const
TypeLoc getInnerTypeLoc () const

Friends

class TypeLoc

Detailed Description

template<class Base, class Derived, class TypeClass, class LocalData>
class clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >

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.

Template Parameters:
Basea class from which to derive
Derivedthe class deriving from this one
TypeClassthe concrete Type subclass associated with this location type
LocalDatathe structure type of local location data for this type

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.

Definition at line 313 of file TypeLoc.h.


Member Function Documentation

template<class Base, class Derived, class TypeClass, class LocalData>
void* clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >::getExtraLocalData ( ) const [inline, protected]

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).

Reimplemented in clang::ConcreteTypeLoc< ObjCObjectTypeLoc, ObjCInterfaceTypeLoc, ObjCInterfaceType, ObjCInterfaceLocInfo >.

Definition at line 366 of file TypeLoc.h.

template<class Base, class Derived, class TypeClass, class LocalData>
unsigned clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >::getExtraLocalDataAlignment ( ) const [inline, protected]
template<class Base, class Derived, class TypeClass, class LocalData>
unsigned clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >::getExtraLocalDataSize ( ) const [inline, protected]
template<class Base, class Derived, class TypeClass, class LocalData>
HasNoInnerType clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >::getInnerType ( ) const [inline, protected]
template<class Base, class Derived, class TypeClass, class LocalData>
TypeLoc clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >::getInnerTypeLoc ( ) const [inline, protected]
template<class Base, class Derived, class TypeClass, class LocalData>
LocalData* clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >::getLocalData ( ) const [inline, protected]
template<class Base, class Derived, class TypeClass, class LocalData>
unsigned clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >::getLocalDataAlignment ( ) const [inline]
template<class Base, class Derived, class TypeClass, class LocalData>
unsigned clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >::getLocalDataSize ( ) const [inline]
template<class Base, class Derived, class TypeClass, class LocalData>
TypeLoc clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >::getNextTypeLoc ( ) const [inline]
template<class Base, class Derived, class TypeClass, class LocalData>
void* clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >::getNonLocalData ( ) const [inline, protected]
template<class Base, class Derived, class TypeClass, class LocalData>
const TypeClass* clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >::getTypePtr ( ) const [inline]

Reimplemented in clang::InheritingConcreteTypeLoc< ArrayTypeLoc, VariableArrayTypeLoc, VariableArrayType >, clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, TagTypeLoc, TagType >, clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, SubstTemplateTypeParmTypeLoc, SubstTemplateTypeParmType >, clang::InheritingConcreteTypeLoc< ArrayTypeLoc, ConstantArrayTypeLoc, ConstantArrayType >, clang::InheritingConcreteTypeLoc< ArrayTypeLoc, DependentSizedArrayTypeLoc, DependentSizedArrayType >, clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, TemplateTypeParmTypeLoc, TemplateTypeParmType >, clang::InheritingConcreteTypeLoc< TagTypeLoc, RecordTypeLoc, RecordType >, clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, InjectedClassNameTypeLoc, InjectedClassNameType >, clang::InheritingConcreteTypeLoc< VectorTypeLoc, ExtVectorTypeLoc, ExtVectorType >, clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, DependentSizedExtVectorTypeLoc, DependentSizedExtVectorType >, clang::InheritingConcreteTypeLoc< TagTypeLoc, EnumTypeLoc, EnumType >, clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, UnresolvedUsingTypeLoc, UnresolvedUsingType >, clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, SubstTemplateTypeParmPackTypeLoc, SubstTemplateTypeParmPackType >, clang::InheritingConcreteTypeLoc< AdjustedTypeLoc, DecayedTypeLoc, DecayedType >, clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, ComplexTypeLoc, ComplexType >, clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, VectorTypeLoc, VectorType >, clang::InheritingConcreteTypeLoc< ArrayTypeLoc, IncompleteArrayTypeLoc, IncompleteArrayType >, clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, AutoTypeLoc, AutoType >, clang::InheritingConcreteTypeLoc< FunctionTypeLoc, FunctionNoProtoTypeLoc, FunctionNoProtoType >, clang::InheritingConcreteTypeLoc< FunctionTypeLoc, FunctionProtoTypeLoc, FunctionProtoType >, clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, TypedefTypeLoc, TypedefType >, clang::InheritingConcreteTypeLoc< ReferenceTypeLoc, RValueReferenceTypeLoc, RValueReferenceType >, clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, DecltypeTypeLoc, DecltypeType >, clang::InheritingConcreteTypeLoc< ReferenceTypeLoc, LValueReferenceTypeLoc, LValueReferenceType >, and clang::ConcreteTypeLoc< ObjCObjectTypeLoc, ObjCInterfaceTypeLoc, ObjCInterfaceType, ObjCInterfaceLocInfo >.

Definition at line 346 of file TypeLoc.h.

Referenced by FormatFunctionParameter(), clang::Sema::getTemplateArgumentPackExpansionPattern(), clang::ConcreteTypeLoc< UnqualTypeLoc, ReferenceTypeLoc, ReferenceType, PointerLikeLocInfo >::getTypePtr(), isEnableIf(), clang::TreeTransform< Derived >::TransformDependentTemplateSpecializationType(), clang::TreeTransform< Derived >::TransformFunctionTypeParams(), clang::TreeTransform< Derived >::TransformReferenceType(), and clang::TreeTransform< Derived >::TransformTemplateSpecializationType().


Friends And Related Function Documentation

template<class Base, class Derived, class TypeClass, class LocalData>
friend class TypeLoc [friend]

Reimplemented in clang::TypeSpecTypeLoc, clang::InheritingConcreteTypeLoc< ArrayTypeLoc, VariableArrayTypeLoc, VariableArrayType >, clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, TagTypeLoc, TagType >, clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, SubstTemplateTypeParmTypeLoc, SubstTemplateTypeParmType >, clang::InheritingConcreteTypeLoc< ArrayTypeLoc, ConstantArrayTypeLoc, ConstantArrayType >, clang::InheritingConcreteTypeLoc< ArrayTypeLoc, DependentSizedArrayTypeLoc, DependentSizedArrayType >, clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, TemplateTypeParmTypeLoc, TemplateTypeParmType >, clang::InheritingConcreteTypeLoc< TagTypeLoc, RecordTypeLoc, RecordType >, clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, InjectedClassNameTypeLoc, InjectedClassNameType >, clang::InheritingConcreteTypeLoc< VectorTypeLoc, ExtVectorTypeLoc, ExtVectorType >, clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, DependentSizedExtVectorTypeLoc, DependentSizedExtVectorType >, clang::InheritingConcreteTypeLoc< TagTypeLoc, EnumTypeLoc, EnumType >, clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, UnresolvedUsingTypeLoc, UnresolvedUsingType >, clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, SubstTemplateTypeParmPackTypeLoc, SubstTemplateTypeParmPackType >, clang::InheritingConcreteTypeLoc< AdjustedTypeLoc, DecayedTypeLoc, DecayedType >, clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, ComplexTypeLoc, ComplexType >, clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, VectorTypeLoc, VectorType >, clang::InheritingConcreteTypeLoc< ArrayTypeLoc, IncompleteArrayTypeLoc, IncompleteArrayType >, clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, AutoTypeLoc, AutoType >, clang::InheritingConcreteTypeLoc< FunctionTypeLoc, FunctionNoProtoTypeLoc, FunctionNoProtoType >, clang::InheritingConcreteTypeLoc< FunctionTypeLoc, FunctionProtoTypeLoc, FunctionProtoType >, clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, TypedefTypeLoc, TypedefType >, clang::InheritingConcreteTypeLoc< ReferenceTypeLoc, RValueReferenceTypeLoc, RValueReferenceType >, clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, DecltypeTypeLoc, DecltypeType >, clang::InheritingConcreteTypeLoc< ReferenceTypeLoc, LValueReferenceTypeLoc, LValueReferenceType >, and clang::ConcreteTypeLoc< ObjCObjectTypeLoc, ObjCInterfaceTypeLoc, ObjCInterfaceType, ObjCInterfaceLocInfo >.

Definition at line 319 of file TypeLoc.h.

Referenced by clang::ConcreteTypeLoc< UnqualTypeLoc, ReferenceTypeLoc, ReferenceType, PointerLikeLocInfo >::getInnerTypeLoc().


The documentation for this class was generated from the following file: