clang API Documentation

Public Member Functions | Static Public Member Functions | Friends
clang::InjectedClassNameType Class Reference

The injected class name of a C++ class template or class template partial specialization. Used to record that a type was spelled with a bare identifier rather than as a template-id; the equivalent for non-templated classes is just RecordType. More...

#include <Type.h>

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

List of all members.

Public Member Functions

QualType getInjectedSpecializationType () const
const TemplateSpecializationTypegetInjectedTST () const
CXXRecordDeclgetDecl () const
bool isSugared () const
QualType desugar () const

Static Public Member Functions

static bool classof (const Type *T)

Friends

class ASTContext
class ASTReader

Detailed Description

The injected class name of a C++ class template or class template partial specialization. Used to record that a type was spelled with a bare identifier rather than as a template-id; the equivalent for non-templated classes is just RecordType.

Injected class name types are always dependent. Template instantiation turns these into RecordTypes.

Injected class name types are always canonical. This works because it is impossible to compare an injected class name type with the corresponding non-injected template type, for the same reason that it is impossible to directly compare template parameters from different dependent contexts: injected class name types can only occur within the scope of a particular templated declaration, and within that scope every template specialization will canonicalize to the injected class name (when appropriate according to the rules of the language).

Definition at line 3884 of file Type.h.


Member Function Documentation

static bool clang::InjectedClassNameType::classof ( const Type T) [inline, static]

Definition at line 3924 of file Type.h.

References clang::Type::getTypeClass().

Definition at line 3922 of file Type.h.

Definition at line 1943 of file Type.cpp.

References getInterestingTagDecl().

Definition at line 3914 of file Type.h.

Referenced by IsStructurallyEquivalent().

Definition at line 3915 of file Type.h.

Definition at line 3921 of file Type.h.


Friends And Related Function Documentation

friend class ASTContext [friend]

Reimplemented from clang::Type.

Definition at line 3898 of file Type.h.

friend class ASTReader [friend]

Reimplemented from clang::Type.

Definition at line 3899 of file Type.h.


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