struct DeclaratorChunk

Declaration

struct DeclaratorChunk { /* full declaration omitted */ };

Description

One instance of this struct is used for each type in a declarator that is parsed. This is intended to be a small value object.

Declared at: clang/include/clang/Sema/DeclSpec.h:1174

Member Variables

public enum(unnamed enum at / home / hdoc / tmp / llvm - project / clang / include / clang / Sema / DeclSpec.h : 1177 : 3) Kind
public clang::SourceLocation Loc
Loc - The place where this type was defined.
public clang::SourceLocation EndLoc
EndLoc - If valid, the place where this chunck ends.
public clang::ParsedAttributesView AttrList
public anonymous struct / union

Method Overview

  • public DeclaratorChunk()
  • public void destroy()
  • public static clang::DeclaratorChunk getArray(unsigned int TypeQuals, bool isStatic, bool isStar, clang::Expr * NumElts, clang::SourceLocation LBLoc, clang::SourceLocation RBLoc)
  • public const clang::ParsedAttributesView & getAttrs() const
  • public clang::ParsedAttributesView & getAttrs()
  • public static clang::DeclaratorChunk getBlockPointer(unsigned int TypeQuals, clang::SourceLocation Loc)
  • public static clang::DeclaratorChunk getFunction(bool HasProto, bool IsAmbiguous, clang::SourceLocation LParenLoc, clang::DeclaratorChunk::ParamInfo * Params, unsigned int NumParams, clang::SourceLocation EllipsisLoc, clang::SourceLocation RParenLoc, bool RefQualifierIsLvalueRef, clang::SourceLocation RefQualifierLoc, clang::SourceLocation MutableLoc, clang::ExceptionSpecificationType ESpecType, clang::SourceRange ESpecRange, clang::ParsedType * Exceptions, clang::SourceRange * ExceptionRanges, unsigned int NumExceptions, clang::Expr * NoexceptExpr, clang::CachedTokens * ExceptionSpecTokens, ArrayRef<clang::NamedDecl *> DeclsInPrototype, clang::SourceLocation LocalRangeBegin, clang::SourceLocation LocalRangeEnd, clang::Declarator & TheDeclarator, clang::TypeResult TrailingReturnType = clang::ActionResult<clang::OpaquePtr<clang::QualType>, false>(), clang::SourceLocation TrailingReturnTypeLoc = clang::SourceLocation(), clang::DeclSpec * MethodQualifiers = nullptr)
  • public static clang::DeclaratorChunk getMemberPointer(const clang::CXXScopeSpec & SS, unsigned int TypeQuals, clang::SourceLocation StarLoc, clang::SourceLocation EndLoc)
  • public static clang::DeclaratorChunk getParen(clang::SourceLocation LParenLoc, clang::SourceLocation RParenLoc)
  • public static clang::DeclaratorChunk getPipe(unsigned int TypeQuals, clang::SourceLocation Loc)
  • public static clang::DeclaratorChunk getPointer(unsigned int TypeQuals, clang::SourceLocation Loc, clang::SourceLocation ConstQualLoc, clang::SourceLocation VolatileQualLoc, clang::SourceLocation RestrictQualLoc, clang::SourceLocation AtomicQualLoc, clang::SourceLocation UnalignedQualLoc)
  • public static clang::DeclaratorChunk getReference(unsigned int TypeQuals, clang::SourceLocation Loc, bool lvalue)
  • public clang::SourceRange getSourceRange() const
  • public bool isParen() const

Methods

DeclaratorChunk()

Declared at: clang/include/clang/Sema/DeclSpec.h:1175

void destroy()

Declared at: clang/include/clang/Sema/DeclSpec.h:1559

static clang::DeclaratorChunk getArray(
    unsigned int TypeQuals,
    bool isStatic,
    bool isStar,
    clang::Expr* NumElts,
    clang::SourceLocation LBLoc,
    clang::SourceLocation RBLoc)

Description

Return a DeclaratorChunk for an array.

Declared at: clang/include/clang/Sema/DeclSpec.h:1609

Parameters

unsigned int TypeQuals
bool isStatic
bool isStar
clang::Expr* NumElts
clang::SourceLocation LBLoc
clang::SourceLocation RBLoc

const clang::ParsedAttributesView& getAttrs()
    const

Description

If there are attributes applied to this declaratorchunk, return them.

Declared at: clang/include/clang/Sema/DeclSpec.h:1574

clang::ParsedAttributesView& getAttrs()

Declared at: clang/include/clang/Sema/DeclSpec.h:1575

static clang::DeclaratorChunk getBlockPointer(
    unsigned int TypeQuals,
    clang::SourceLocation Loc)

Description

Return a DeclaratorChunk for a block.

Declared at: clang/include/clang/Sema/DeclSpec.h:1652

Parameters

unsigned int TypeQuals
clang::SourceLocation Loc

static clang::DeclaratorChunk getFunction(
    bool HasProto,
    bool IsAmbiguous,
    clang::SourceLocation LParenLoc,
    clang::DeclaratorChunk::ParamInfo* Params,
    unsigned int NumParams,
    clang::SourceLocation EllipsisLoc,
    clang::SourceLocation RParenLoc,
    bool RefQualifierIsLvalueRef,
    clang::SourceLocation RefQualifierLoc,
    clang::SourceLocation MutableLoc,
    clang::ExceptionSpecificationType ESpecType,
    clang::SourceRange ESpecRange,
    clang::ParsedType* Exceptions,
    clang::SourceRange* ExceptionRanges,
    unsigned int NumExceptions,
    clang::Expr* NoexceptExpr,
    clang::CachedTokens* ExceptionSpecTokens,
    ArrayRef<clang::NamedDecl*> DeclsInPrototype,
    clang::SourceLocation LocalRangeBegin,
    clang::SourceLocation LocalRangeEnd,
    clang::Declarator& TheDeclarator,
    clang::TypeResult TrailingReturnType =
        clang::ActionResult<
            clang::OpaquePtr<clang::QualType>,
            false>(),
    clang::SourceLocation TrailingReturnTypeLoc =
        clang::SourceLocation(),
    clang::DeclSpec* MethodQualifiers = nullptr)

Description

DeclaratorChunk::getFunction - Return a DeclaratorChunk for a function. "TheDeclarator" is the declarator that this will be added to.

Declared at: clang/include/clang/Sema/DeclSpec.h:1625

Parameters

bool HasProto
bool IsAmbiguous
clang::SourceLocation LParenLoc
clang::DeclaratorChunk::ParamInfo* Params
unsigned int NumParams
clang::SourceLocation EllipsisLoc
clang::SourceLocation RParenLoc
bool RefQualifierIsLvalueRef
clang::SourceLocation RefQualifierLoc
clang::SourceLocation MutableLoc
clang::ExceptionSpecificationType ESpecType
clang::SourceRange ESpecRange
clang::ParsedType* Exceptions
clang::SourceRange* ExceptionRanges
unsigned int NumExceptions
clang::Expr* NoexceptExpr
clang::CachedTokens* ExceptionSpecTokens
ArrayRef<clang::NamedDecl*> DeclsInPrototype
clang::SourceLocation LocalRangeBegin
clang::SourceLocation LocalRangeEnd
clang::Declarator& TheDeclarator
clang::TypeResult TrailingReturnType = clang::ActionResult<clang::OpaquePtr<clang::QualType>, false>()
clang::SourceLocation TrailingReturnTypeLoc = clang::SourceLocation()
clang::DeclSpec* MethodQualifiers = nullptr

static clang::DeclaratorChunk getMemberPointer(
    const clang::CXXScopeSpec& SS,
    unsigned int TypeQuals,
    clang::SourceLocation StarLoc,
    clang::SourceLocation EndLoc)

Declared at: clang/include/clang/Sema/DeclSpec.h:1671

Parameters

const clang::CXXScopeSpec& SS
unsigned int TypeQuals
clang::SourceLocation StarLoc
clang::SourceLocation EndLoc

static clang::DeclaratorChunk getParen(
    clang::SourceLocation LParenLoc,
    clang::SourceLocation RParenLoc)

Description

Return a DeclaratorChunk for a paren.

Declared at: clang/include/clang/Sema/DeclSpec.h:1687

Parameters

clang::SourceLocation LParenLoc
clang::SourceLocation RParenLoc

static clang::DeclaratorChunk getPipe(
    unsigned int TypeQuals,
    clang::SourceLocation Loc)

Description

Return a DeclaratorChunk for a block.

Declared at: clang/include/clang/Sema/DeclSpec.h:1662

Parameters

unsigned int TypeQuals
clang::SourceLocation Loc

static clang::DeclaratorChunk getPointer(
    unsigned int TypeQuals,
    clang::SourceLocation Loc,
    clang::SourceLocation ConstQualLoc,
    clang::SourceLocation VolatileQualLoc,
    clang::SourceLocation RestrictQualLoc,
    clang::SourceLocation AtomicQualLoc,
    clang::SourceLocation UnalignedQualLoc)

Description

Return a DeclaratorChunk for a pointer.

Declared at: clang/include/clang/Sema/DeclSpec.h:1578

Parameters

unsigned int TypeQuals
clang::SourceLocation Loc
clang::SourceLocation ConstQualLoc
clang::SourceLocation VolatileQualLoc
clang::SourceLocation RestrictQualLoc
clang::SourceLocation AtomicQualLoc
clang::SourceLocation UnalignedQualLoc

static clang::DeclaratorChunk getReference(
    unsigned int TypeQuals,
    clang::SourceLocation Loc,
    bool lvalue)

Description

Return a DeclaratorChunk for a reference.

Declared at: clang/include/clang/Sema/DeclSpec.h:1598

Parameters

unsigned int TypeQuals
clang::SourceLocation Loc
bool lvalue

clang::SourceRange getSourceRange() const

Declared at: clang/include/clang/Sema/DeclSpec.h:1186

bool isParen() const

Declared at: clang/include/clang/Sema/DeclSpec.h:1696