class TypeDecl

Declaration

class TypeDecl : public NamedDecl { /* full declaration omitted */ };

Description

Represents a declaration of a type.

Declared at: clang/include/clang/AST/Decl.h:3176

Inherits from: NamedDecl

Member Variables

private const clang::Type* TypeForDecl = nullptr
This indicates the Type object that represents this TypeDecl. It is a cache maintained by ASTContext::getTypedefType, ASTContext::getTagDeclType, and ASTContext::getTemplateTypeParmType, and TemplateTypeParmDecl.
private clang::SourceLocation LocStart
The start of the source range for this declaration.

Inherited from Decl:

protected NextInContextAndBits
protected Access
protected FromASTFile
protected IdentifierNamespace
protected CacheValidAndLinkage

Method Overview

  • protected TypeDecl(clang::Decl::Kind DK, clang::DeclContext * DC, clang::SourceLocation L, clang::IdentifierInfo * Id, clang::SourceLocation StartL = clang::SourceLocation())
  • private void anchor()
  • public static bool classof(const clang::Decl * D)
  • public static bool classofKind(clang::Decl::Kind K)
  • public clang::SourceLocation getBeginLoc() const
  • public clang::SourceRange getSourceRange() const
  • public const clang::Type * getTypeForDecl() const
  • public void setLocStart(clang::SourceLocation L)
  • public void setTypeForDecl(const clang::Type * TD)

Inherited from NamedDecl:

Inherited from Decl:

Methods

TypeDecl(clang::Decl::Kind DK,
         clang::DeclContext* DC,
         clang::SourceLocation L,
         clang::IdentifierInfo* Id,
         clang::SourceLocation StartL =
             clang::SourceLocation())

Declared at: clang/include/clang/AST/Decl.h:3191

Parameters

clang::Decl::Kind DK
clang::DeclContext* DC
clang::SourceLocation L
clang::IdentifierInfo* Id
clang::SourceLocation StartL = clang::SourceLocation()

void anchor()

Declared at: clang/include/clang/AST/Decl.h:3188

static bool classof(const clang::Decl* D)

Declared at: clang/include/clang/AST/Decl.h:3213

Parameters

const clang::Decl* D

static bool classofKind(clang::Decl::Kind K)

Declared at: clang/include/clang/AST/Decl.h:3214

Parameters

clang::Decl::Kind K

clang::SourceLocation getBeginLoc() const

Declared at: clang/include/clang/AST/Decl.h:3203

clang::SourceRange getSourceRange() const

Description

Source range that this declaration covers.

Declared at: clang/include/clang/AST/Decl.h:3205

const clang::Type* getTypeForDecl() const

Declared at: clang/include/clang/AST/Decl.h:3200

void setLocStart(clang::SourceLocation L)

Declared at: clang/include/clang/AST/Decl.h:3204

Parameters

clang::SourceLocation L

void setTypeForDecl(const clang::Type* TD)

Declared at: clang/include/clang/AST/Decl.h:3201

Parameters

const clang::Type* TD