clang: clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData (original) (raw)
A metaprogramming base class for [TypeLoc](classclang%5F1%5F1TypeLoc.html "Base wrapper for a particular "section" of type source info.") classes which correspond to a particular Type subclass. More...
#include "[clang/AST/TypeLoc.h](TypeLoc%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| unsigned | getLocalDataAlignment () const |
| unsigned | getLocalDataSize () const |
| void | copyLocal (Derived other) |
| TypeLoc | getNextTypeLoc () const |
| const TypeClass * | getTypePtr () const |
| Protected Member Functions | |
|---|---|
| unsigned | getExtraLocalDataSize () const |
| unsigned | getExtraLocalDataAlignment () const |
| LocalData * | getLocalData () const |
| void * | getExtraLocalData () const |
| Gets a pointer past the Info structure; useful for classes with local data that can't be captured in the Info (e.g. | |
| void * | getNonLocalData () const |
| HasNoInnerType | getInnerType () const |
| TypeLoc | getInnerTypeLoc () const |
template<class Base, class Derived, class TypeClass, class LocalData>
class clang::ConcreteTypeLoc< Base, Derived, TypeClass, LocalData >
A metaprogramming base class for [TypeLoc](classclang%5F1%5F1TypeLoc.html "Base wrapper for a particular "section" of type source info.") classes which correspond to a particular Type subclass.
It is accepted for a single [TypeLoc](classclang%5F1%5F1TypeLoc.html "Base wrapper for a particular "section" of type source info.") class to correspond to multiple Type classes.
Template Parameters
| 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 |
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 384 of file TypeLoc.h.
◆ copyLocal()
template<class Base, class Derived, class TypeClass, class LocalData>
◆ getExtraLocalData()
template<class Base, class Derived, class TypeClass, class LocalData>
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).
Definition at line 453 of file TypeLoc.h.
Referenced by copyLocal().
◆ getExtraLocalDataAlignment()
template<class Base, class Derived, class TypeClass, class LocalData>
◆ getExtraLocalDataSize()
template<class Base, class Derived, class TypeClass, class LocalData>
◆ getInnerType()
template<class Base, class Derived, class TypeClass, class LocalData>
◆ getInnerTypeLoc()
template<class Base, class Derived, class TypeClass, class LocalData>
◆ getLocalData()
template<class Base, class Derived, class TypeClass, class LocalData>
◆ getLocalDataAlignment()
template<class Base, class Derived, class TypeClass, class LocalData>
◆ getLocalDataSize()
template<class Base, class Derived, class TypeClass, class LocalData>
◆ getNextTypeLoc()
template<class Base, class Derived, class TypeClass, class LocalData>
◆ getNonLocalData()
template<class Base, class Derived, class TypeClass, class LocalData>
◆ getTypePtr()
template<class Base, class Derived, class TypeClass, class LocalData>
Definition at line 433 of file TypeLoc.h.
References clang::cast().
Referenced by clang::Sema::ActOnTypeName(), AddObjCProperties(), clang::comments::DeclInfo::fill(), fillAttributedTypeLoc(), fillHLSLAttributedResourceTypeLoc(), clang::Sema::getTemplateArgumentPackExpansionPattern(), GetTypeSourceInfoForDeclarator(), isEnableIf(), clang::TreeTransform< Derived >::TransformFunctionTypeParams(), clang::TreeTransform< Derived >::TransformReferenceType(), and clang::TreeTransform< Derived >::TransformTagType().
◆ TypeLoc
template<class Base, class Derived, class TypeClass, class LocalData>
The documentation for this class was generated from the following file:
- include/clang/AST/TypeLoc.h