clang API Documentation
A reasonable base class for TypeLocs that correspond to types that are written as a type-specifier. More...
#include <TypeLoc.h>


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) |
A reasonable base class for TypeLocs that correspond to types that are written as a type-specifier.
| 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] |
Reimplemented from clang::ConcreteTypeLoc< UnqualTypeLoc, TypeSpecTypeLoc, Type, TypeSpecLocInfo >.
| 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] |
Definition at line 406 of file TypeLoc.h.
References clang::ConcreteTypeLoc< UnqualTypeLoc, TypeSpecTypeLoc, Type, TypeSpecLocInfo >::getLocalData(), and clang::TypeSpecLocInfo::NameLoc.
Referenced by getLocalSourceRange(), clang::ObjCInterfaceTypeLoc::getLocalSourceRange(), clang::DependentNameTypeLoc::getLocalSourceRange(), and clang::TagTypeLoc::isDefinition().
| 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] |
Definition at line 409 of file TypeLoc.h.
References clang::ConcreteTypeLoc< UnqualTypeLoc, TypeSpecTypeLoc, Type, TypeSpecLocInfo >::getLocalData(), and clang::TypeSpecLocInfo::NameLoc.
Referenced by clang::Sema::ActOnCXXNestedNameSpecifierDecltype(), clang::Sema::ActOnPseudoDestructorExpr(), clang::Sema::BuildCXXNestedNameSpecifier(), clang::Sema::getTypeName(), initializeLocal(), and clang::ObjCInterfaceTypeLoc::initializeLocal().