clang API Documentation

Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Friends
clang::TypeLoc Class Reference

Base wrapper for a particular "section" of type source info. More...

#include <TypeLoc.h>

Inheritance diagram for clang::TypeLoc:
Inheritance graph
[legend]
Collaboration diagram for clang::TypeLoc:
Collaboration graph
[legend]

List of all members.

Public Types

enum  TypeLocClass

Public Member Functions

 TypeLoc ()
 TypeLoc (QualType ty, void *opaqueData)
 TypeLoc (const Type *ty, void *opaqueData)
TypeLocClass getTypeLocClass () const
bool isNull () const
 operator bool () const
QualType getType () const
 Get the type for which this source info wrapper provides information.
const TypegetTypePtr () const
void * getOpaqueData () const
 Get the pointer where source information is stored.
SourceLocation getBeginLoc () const
 Get the begin source location.
SourceLocation getEndLoc () const
 Get the end source location.
SourceRange getSourceRange () const LLVM_READONLY
 Get the full source range.
SourceLocation getLocStart () const LLVM_READONLY
SourceLocation getLocEnd () const LLVM_READONLY
SourceRange getLocalSourceRange () const
 Get the local source range.
unsigned getFullDataSize () const
 Returns the size of the type source info data block.
TypeLoc getNextTypeLoc () const
 Get the next TypeLoc pointed by this TypeLoc, e.g for "int*" the TypeLoc is a PointerLoc and next TypeLoc is for "int".
UnqualTypeLoc getUnqualifiedLoc () const
 Skips past any qualifiers, if this is qualified.
TypeLoc IgnoreParens () const
void initialize (ASTContext &Context, SourceLocation Loc) const
 Initializes this to state that every location in this type is the given location.
void initializeFullCopy (TypeLoc Other) const
 Initializes this by copying its information from another TypeLoc of the same type.
void initializeFullCopy (TypeLoc Other, unsigned Size) const
 Initializes this by copying its information from another TypeLoc of the same type. The given size must be the full data size.

Static Public Member Functions

static unsigned getFullDataSizeForType (QualType Ty)
 Returns the size of type source info data block for the given type.
static bool classof (const TypeLoc *TL)

Protected Attributes

const void * Ty
void * Data

Friends

bool operator== (const TypeLoc &LHS, const TypeLoc &RHS)
bool operator!= (const TypeLoc &LHS, const TypeLoc &RHS)

Detailed Description

Base wrapper for a particular "section" of type source info.

A client should use the TypeLoc subclasses through cast/dyn_cast in order to get at the actual information.

Definition at line 39 of file TypeLoc.h.


Member Enumeration Documentation

The kinds of TypeLocs. Equivalent to the Type::TypeClass enum, except it also defines a Qualified enum that corresponds to the QualifiedLoc class.

Definition at line 50 of file TypeLoc.h.


Constructor & Destructor Documentation

clang::TypeLoc::TypeLoc ( ) [inline]

Definition at line 58 of file TypeLoc.h.

Referenced by getFullDataSizeForType().

clang::TypeLoc::TypeLoc ( QualType  ty,
void *  opaqueData 
) [inline]

Definition at line 59 of file TypeLoc.h.

clang::TypeLoc::TypeLoc ( const Type ty,
void *  opaqueData 
) [inline]

Definition at line 61 of file TypeLoc.h.


Member Function Documentation

static bool clang::TypeLoc::classof ( const TypeLoc TL) [inline, static]

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< 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 >, clang::ConcreteTypeLoc< ObjCObjectTypeLoc, ObjCInterfaceTypeLoc, ObjCInterfaceType, ObjCInterfaceLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, PackExpansionTypeLoc, PackExpansionType, PackExpansionTypeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, DependentNameTypeLoc, DependentNameType, DependentNameLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, TemplateSpecializationTypeLoc, TemplateSpecializationType, TemplateSpecializationLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, UnaryTransformTypeLoc, UnaryTransformType, UnaryTransformTypeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, TypeOfExprTypeLoc, TypeOfExprType, TypeOfExprTypeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, AttributedTypeLoc, AttributedType, AttributedLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, FunctionTypeLoc, FunctionType, FunctionLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, ParenTypeLoc, ParenType, ParenLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, DependentTemplateSpecializationTypeLoc, DependentTemplateSpecializationType, DependentTemplateSpecializationLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, ObjCObjectTypeLoc, ObjCObjectType, ObjCProtocolListLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, BuiltinTypeLoc, BuiltinType, BuiltinLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, PointerTypeLoc, PointerType, PointerLikeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, AtomicTypeLoc, AtomicType, AtomicTypeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, TypeOfTypeLoc, TypeOfType, TypeOfTypeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, ArrayTypeLoc, ArrayType, ArrayLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, BlockPointerTypeLoc, BlockPointerType, PointerLikeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, ObjCObjectPointerTypeLoc, ObjCObjectPointerType, PointerLikeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, Derived, TypeClass, LocalData >, clang::ConcreteTypeLoc< UnqualTypeLoc, TypeSpecTypeLoc, Type, TypeSpecLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, MemberPointerTypeLoc, MemberPointerType, MemberPointerLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, ElaboratedTypeLoc, ElaboratedType, ElaboratedLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, ReferenceTypeLoc, ReferenceType, PointerLikeLocInfo >, clang::QualifiedTypeLoc, and clang::UnqualTypeLoc.

Definition at line 162 of file TypeLoc.h.

SourceLocation TypeLoc::getBeginLoc ( ) const
SourceLocation TypeLoc::getEndLoc ( ) const
unsigned clang::TypeLoc::getFullDataSize ( ) const [inline]

Returns the size of the type source info data block.

Reimplemented in clang::ConcreteTypeLoc< ObjCObjectTypeLoc, ObjCInterfaceTypeLoc, ObjCInterfaceType, ObjCInterfaceLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, PackExpansionTypeLoc, PackExpansionType, PackExpansionTypeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, DependentNameTypeLoc, DependentNameType, DependentNameLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, TemplateSpecializationTypeLoc, TemplateSpecializationType, TemplateSpecializationLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, UnaryTransformTypeLoc, UnaryTransformType, UnaryTransformTypeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, TypeOfExprTypeLoc, TypeOfExprType, TypeOfExprTypeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, AttributedTypeLoc, AttributedType, AttributedLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, FunctionTypeLoc, FunctionType, FunctionLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, ParenTypeLoc, ParenType, ParenLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, DependentTemplateSpecializationTypeLoc, DependentTemplateSpecializationType, DependentTemplateSpecializationLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, ObjCObjectTypeLoc, ObjCObjectType, ObjCProtocolListLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, BuiltinTypeLoc, BuiltinType, BuiltinLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, PointerTypeLoc, PointerType, PointerLikeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, AtomicTypeLoc, AtomicType, AtomicTypeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, TypeOfTypeLoc, TypeOfType, TypeOfTypeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, ArrayTypeLoc, ArrayType, ArrayLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, BlockPointerTypeLoc, BlockPointerType, PointerLikeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, ObjCObjectPointerTypeLoc, ObjCObjectPointerType, PointerLikeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, Derived, TypeClass, LocalData >, clang::ConcreteTypeLoc< UnqualTypeLoc, TypeSpecTypeLoc, Type, TypeSpecLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, MemberPointerTypeLoc, MemberPointerType, MemberPointerLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, ElaboratedTypeLoc, ElaboratedType, ElaboratedLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, ReferenceTypeLoc, ReferenceType, PointerLikeLocInfo >, and clang::QualifiedTypeLoc.

Definition at line 109 of file TypeLoc.h.

References getFullDataSizeForType(), and getType().

Referenced by clang::Sema::ActOnBlockArguments(), clang::Sema::CheckPackExpansion(), clang::TemplateArgumentLoc::getPackExpansionPattern(), clang::Sema::GetTypeSourceInfoForDeclarator(), initializeFullCopy(), clang::TypeLocBuilder::pushFullCopy(), clang::Sema::SubstFunctionDeclType(), clang::Sema::SubstType(), clang::TreeTransform< Derived >::TransformFunctionTypeParam(), and clang::TreeTransform< Derived >::TransformType().

unsigned TypeLoc::getFullDataSizeForType ( QualType  Ty) [static]

Returns the size of type source info data block for the given type.

Returns the size of the type source info data block.

Definition at line 54 of file TypeLoc.cpp.

References clang::QualType::isNull(), and TypeLoc().

Referenced by clang::ASTContext::CreateTypeSourceInfo(), getFullDataSize(), clang::QualifiedTypeLoc::getFullDataSize(), and clang::TypeLocBuilder::pushFullUninitialized().

SourceRange clang::TypeLoc::getLocalSourceRange ( ) const [inline]

Get the local source range.

Reimplemented in clang::AtomicTypeLoc, clang::PackExpansionTypeLoc, clang::DependentTemplateSpecializationTypeLoc, clang::DependentNameTypeLoc, clang::ElaboratedTypeLoc, clang::UnaryTransformTypeLoc, clang::TypeOfExprTypeLoc, clang::TypeofLikeTypeLoc< Derived, TypeClass, LocalData >, clang::TypeofLikeTypeLoc< TypeOfExprTypeLoc, TypeOfExprType, TypeOfExprTypeLocInfo >, clang::TypeofLikeTypeLoc< TypeOfTypeLoc, TypeOfType, TypeOfTypeLocInfo >, clang::TemplateSpecializationTypeLoc, clang::ArrayTypeLoc, clang::FunctionTypeLoc, clang::MemberPointerTypeLoc, clang::PointerLikeTypeLoc< Derived, TypeClass, LocalData >, clang::PointerLikeTypeLoc< PointerTypeLoc, PointerType >, clang::PointerLikeTypeLoc< BlockPointerTypeLoc, BlockPointerType >, clang::PointerLikeTypeLoc< ReferenceTypeLoc, ReferenceType >, clang::PointerLikeTypeLoc< MemberPointerTypeLoc, MemberPointerType, MemberPointerLocInfo >, clang::PointerLikeTypeLoc< ObjCObjectPointerTypeLoc, ObjCObjectPointerType >, clang::ParenTypeLoc, clang::ObjCInterfaceTypeLoc, clang::ObjCObjectTypeLoc, clang::AttributedTypeLoc, clang::BuiltinTypeLoc, clang::TypeSpecTypeLoc, and clang::QualifiedTypeLoc.

Definition at line 104 of file TypeLoc.h.

Referenced by clang::Sema::BuildBaseInitializer(), clang::Sema::BuildBuiltinOffsetOf(), clang::Sema::BuildDelegatingInitializer(), clang::Sema::BuildPseudoDestructorExpr(), clang::Sema::CheckFriendTypeDecl(), getBeginLoc(), getEndLoc(), and clang::PseudoDestructorTypeStorage::PseudoDestructorTypeStorage().

SourceLocation clang::TypeLoc::getLocEnd ( ) const [inline]

Definition at line 101 of file TypeLoc.h.

References getEndLoc().

Referenced by clang::Sema::CheckParameter().

SourceLocation clang::TypeLoc::getLocStart ( ) const [inline]

Definition at line 100 of file TypeLoc.h.

References getBeginLoc().

Referenced by clang::ASTImporter::Import().

TypeLoc clang::TypeLoc::getNextTypeLoc ( ) const [inline]

Get the next TypeLoc pointed by this TypeLoc, e.g for "int*" the TypeLoc is a PointerLoc and next TypeLoc is for "int".

Reimplemented in clang::ConcreteTypeLoc< ObjCObjectTypeLoc, ObjCInterfaceTypeLoc, ObjCInterfaceType, ObjCInterfaceLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, PackExpansionTypeLoc, PackExpansionType, PackExpansionTypeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, DependentNameTypeLoc, DependentNameType, DependentNameLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, TemplateSpecializationTypeLoc, TemplateSpecializationType, TemplateSpecializationLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, UnaryTransformTypeLoc, UnaryTransformType, UnaryTransformTypeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, TypeOfExprTypeLoc, TypeOfExprType, TypeOfExprTypeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, AttributedTypeLoc, AttributedType, AttributedLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, FunctionTypeLoc, FunctionType, FunctionLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, ParenTypeLoc, ParenType, ParenLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, DependentTemplateSpecializationTypeLoc, DependentTemplateSpecializationType, DependentTemplateSpecializationLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, ObjCObjectTypeLoc, ObjCObjectType, ObjCProtocolListLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, BuiltinTypeLoc, BuiltinType, BuiltinLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, PointerTypeLoc, PointerType, PointerLikeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, AtomicTypeLoc, AtomicType, AtomicTypeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, TypeOfTypeLoc, TypeOfType, TypeOfTypeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, ArrayTypeLoc, ArrayType, ArrayLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, BlockPointerTypeLoc, BlockPointerType, PointerLikeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, ObjCObjectPointerTypeLoc, ObjCObjectPointerType, PointerLikeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, Derived, TypeClass, LocalData >, clang::ConcreteTypeLoc< UnqualTypeLoc, TypeSpecTypeLoc, Type, TypeSpecLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, MemberPointerTypeLoc, MemberPointerType, MemberPointerLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, ElaboratedTypeLoc, ElaboratedType, ElaboratedLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, ReferenceTypeLoc, ReferenceType, PointerLikeLocInfo >, and clang::QualifiedTypeLoc.

Definition at line 115 of file TypeLoc.h.

Referenced by clang::ASTWriter::AddTypeLoc(), getBeginLoc(), getEndLoc(), and clang::Sema::GetTypeSourceInfoForDeclarator().

void* clang::TypeLoc::getOpaqueData ( ) const [inline]
SourceRange clang::TypeLoc::getSourceRange ( ) const [inline]
QualType clang::TypeLoc::getType ( ) const [inline]
TypeLocClass clang::TypeLoc::getTypeLocClass ( ) const [inline]
const Type* clang::TypeLoc::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< 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 >, clang::ConcreteTypeLoc< ObjCObjectTypeLoc, ObjCInterfaceTypeLoc, ObjCInterfaceType, ObjCInterfaceLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, PackExpansionTypeLoc, PackExpansionType, PackExpansionTypeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, DependentNameTypeLoc, DependentNameType, DependentNameLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, TemplateSpecializationTypeLoc, TemplateSpecializationType, TemplateSpecializationLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, UnaryTransformTypeLoc, UnaryTransformType, UnaryTransformTypeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, TypeOfExprTypeLoc, TypeOfExprType, TypeOfExprTypeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, AttributedTypeLoc, AttributedType, AttributedLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, FunctionTypeLoc, FunctionType, FunctionLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, ParenTypeLoc, ParenType, ParenLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, DependentTemplateSpecializationTypeLoc, DependentTemplateSpecializationType, DependentTemplateSpecializationLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, ObjCObjectTypeLoc, ObjCObjectType, ObjCProtocolListLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, BuiltinTypeLoc, BuiltinType, BuiltinLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, PointerTypeLoc, PointerType, PointerLikeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, AtomicTypeLoc, AtomicType, AtomicTypeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, TypeOfTypeLoc, TypeOfType, TypeOfTypeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, ArrayTypeLoc, ArrayType, ArrayLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, BlockPointerTypeLoc, BlockPointerType, PointerLikeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, ObjCObjectPointerTypeLoc, ObjCObjectPointerType, PointerLikeLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, Derived, TypeClass, LocalData >, clang::ConcreteTypeLoc< UnqualTypeLoc, TypeSpecTypeLoc, Type, TypeSpecLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, MemberPointerTypeLoc, MemberPointerType, MemberPointerLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, ElaboratedTypeLoc, ElaboratedType, ElaboratedLocInfo >, clang::ConcreteTypeLoc< UnqualTypeLoc, ReferenceTypeLoc, ReferenceType, PointerLikeLocInfo >, and clang::UnqualTypeLoc.

Definition at line 81 of file TypeLoc.h.

References clang::QualType::getFromOpaquePtr(), clang::QualType::getTypePtr(), and Ty.

Referenced by clang::ConcreteTypeLoc< UnqualTypeLoc, ReferenceTypeLoc, ReferenceType, PointerLikeLocInfo >::classof(), clang::InheritingConcreteTypeLoc< ReferenceTypeLoc, LValueReferenceTypeLoc, LValueReferenceType >::classof(), clang::NestedNameSpecifierLocBuilder::Extend(), and clang::QualifiedTypeLoc::getUnqualifiedLoc().

UnqualTypeLoc clang::TypeLoc::getUnqualifiedLoc ( ) const [inline]

Skips past any qualifiers, if this is qualified.

Reimplemented in clang::QualifiedTypeLoc.

Definition at line 243 of file TypeLoc.h.

Referenced by FormatFunctionParameter(), clang::Sema::GetTypeSourceInfoForDeclarator(), and clang::RecursiveASTVisitor< CallGraph >::WalkUpFromUnqualTypeLoc().

TypeLoc clang::TypeLoc::IgnoreParens ( ) const [inline]
void clang::TypeLoc::initialize ( ASTContext Context,
SourceLocation  Loc 
) const [inline]

Initializes this to state that every location in this type is the given location.

This method exists to provide a simple transition for code that relies on location-less types.

Definition at line 133 of file TypeLoc.h.

Referenced by clang::ASTContext::getTrivialTypeSourceInfo().

void clang::TypeLoc::initializeFullCopy ( TypeLoc  Other) const [inline]

Initializes this by copying its information from another TypeLoc of the same type.

Definition at line 139 of file TypeLoc.h.

References getFullDataSize(), getOpaqueData(), and getType().

Referenced by clang::Sema::ActOnBlockArguments().

void clang::TypeLoc::initializeFullCopy ( TypeLoc  Other,
unsigned  Size 
) const [inline]

Initializes this by copying its information from another TypeLoc of the same type. The given size must be the full data size.

Definition at line 148 of file TypeLoc.h.

References getFullDataSize(), getOpaqueData(), and getType().

bool clang::TypeLoc::isNull ( ) const [inline]
clang::TypeLoc::operator bool ( ) const [inline]

Definition at line 70 of file TypeLoc.h.

References Ty.


Friends And Related Function Documentation

bool operator!= ( const TypeLoc LHS,
const TypeLoc RHS 
) [friend]

Definition at line 158 of file TypeLoc.h.

bool operator== ( const TypeLoc LHS,
const TypeLoc RHS 
) [friend]

Definition at line 154 of file TypeLoc.h.


Member Data Documentation

void* clang::TypeLoc::Data [protected]
const void* clang::TypeLoc::Ty [protected]

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