clang API Documentation

Public Types | Public Member Functions | Static Public Member Functions
clang::TypeSpecTypeLoc Class Reference

A reasonable base class for TypeLocs that correspond to types that are written as a type-specifier. More...

#include <TypeLoc.h>

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

List of all members.

Public Types

enum  { LocalDataSize = sizeof(TypeSpecLocInfo) }

Public Member Functions

SourceLocation getNameLoc () const
void setNameLoc (SourceLocation Loc)
SourceRange getLocalSourceRange () const
 Get the local source range.
void initializeLocal (ASTContext &Context, SourceLocation Loc)

Static Public Member Functions

static bool classof (const TypeLoc *TL)
 Determines if the given type loc corresponds to a TypeSpecTypeLoc. Since there is not actually a TypeSpecType in the type hierarchy, this is made somewhat complicated.
static bool classof (const TypeSpecTypeLoc *TL)

Detailed Description

A reasonable base class for TypeLocs that correspond to types that are written as a type-specifier.

Definition at line 399 of file TypeLoc.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
LocalDataSize 

Definition at line 404 of file TypeLoc.h.


Member Function Documentation

bool TypeSpecTypeLoc::classof ( const TypeLoc TL) [static]

Determines if the given type loc corresponds to a TypeSpecTypeLoc. Since there is not actually a TypeSpecType in the type hierarchy, this is made somewhat complicated.

There are a lot of types that currently use TypeSpecTypeLoc because it's a convenient base class. Ideally we would not accept those here, but ideally we would have better implementations for them.

Reimplemented from clang::ConcreteTypeLoc< UnqualTypeLoc, TypeSpecTypeLoc, Type, TypeSpecLocInfo >.

Reimplemented in clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, TagTypeLoc, TagType >, clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, SubstTemplateTypeParmTypeLoc, SubstTemplateTypeParmType >, 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< TypeSpecTypeLoc, AutoTypeLoc, AutoType >, clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, TypedefTypeLoc, TypedefType >, and clang::InheritingConcreteTypeLoc< TypeSpecTypeLoc, DecltypeTypeLoc, DecltypeType >.

Definition at line 179 of file TypeLoc.cpp.

References clang::TypeLoc::getType(), and clang::QualType::hasLocalQualifiers().

static bool clang::TypeSpecTypeLoc::classof ( const TypeSpecTypeLoc TL) [inline, static]
SourceRange clang::TypeSpecTypeLoc::getLocalSourceRange ( ) const [inline]

Get the local source range.

Reimplemented from clang::TypeLoc.

Definition at line 412 of file TypeLoc.h.

References getNameLoc().

SourceLocation clang::TypeSpecTypeLoc::getNameLoc ( ) const [inline]
void clang::TypeSpecTypeLoc::initializeLocal ( ASTContext Context,
SourceLocation  Loc 
) [inline]

Definition at line 415 of file TypeLoc.h.

References setNameLoc().

void clang::TypeSpecTypeLoc::setNameLoc ( SourceLocation  Loc) [inline]

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