class ExtQuals

Declaration

class ExtQuals : public ExtQualsTypeCommonBase, public Node { /* full declaration omitted */ };

Description

We can encode up to four bits in the low bits of a type pointer, but there are many more type qualifiers that we want to be able to apply to an arbitrary type. Therefore we have this struct, intended to be heap-allocated and used by QualType to store qualifiers. The current design tags the 'const', 'restrict', and 'volatile' qualifiers in three low bits on the QualType pointer; a fourth bit records whether the pointer is an ExtQuals node. The extended qualifiers (address spaces, Objective-C GC attributes) are much more rare.

Declared at: clang/include/clang/AST/Type.h:1444

Inherits from: ExtQualsTypeCommonBase, FoldingSetBase::Node

Member Variables

private clang::Qualifiers Quals
The immutable set of qualifiers applied by this node. Always contains extended qualifiers.

Method Overview

Inherited from FoldingSetBase::Node:

Inherited from ExtQualsTypeCommonBase:

    Methods

    ExtQuals(const clang::Type* baseType,
             clang::QualType canon,
             clang::Qualifiers quals)

    Declared at: clang/include/clang/AST/Type.h:1465

    Parameters

    const clang::Type* baseType
    clang::QualType canon
    clang::Qualifiers quals

    void Profile(llvm::FoldingSetNodeID& ID) const

    Declared at: clang/include/clang/AST/Type.h:1491

    Parameters

    llvm::FoldingSetNodeID& ID

    static void Profile(llvm::FoldingSetNodeID& ID,
                        const clang::Type* BaseType,
                        clang::Qualifiers Quals)

    Declared at: clang/include/clang/AST/Type.h:1495

    Parameters

    llvm::FoldingSetNodeID& ID
    const clang::Type* BaseType
    clang::Qualifiers Quals

    clang::LangAS getAddressSpace() const

    Declared at: clang/include/clang/AST/Type.h:1486

    const clang::Type* getBaseType() const

    Declared at: clang/include/clang/AST/Type.h:1488

    Qualifiers::GC getObjCGCAttr() const

    Declared at: clang/include/clang/AST/Type.h:1478

    Qualifiers::ObjCLifetime getObjCLifetime() const

    Declared at: clang/include/clang/AST/Type.h:1481

    clang::Qualifiers getQualifiers() const

    Declared at: clang/include/clang/AST/Type.h:1475

    bool hasAddressSpace() const

    Declared at: clang/include/clang/AST/Type.h:1485

    bool hasObjCGCAttr() const

    Declared at: clang/include/clang/AST/Type.h:1477

    bool hasObjCLifetime() const

    Declared at: clang/include/clang/AST/Type.h:1480

    clang::ExtQuals* this_()

    Declared at: clang/include/clang/AST/Type.h:1462