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
- public ExtQuals(const clang::Type * baseType, clang::QualType canon, clang::Qualifiers quals)
- public void Profile(llvm::FoldingSetNodeID & ID) const
- public static void Profile(llvm::FoldingSetNodeID & ID, const clang::Type * BaseType, clang::Qualifiers Quals)
- public clang::LangAS getAddressSpace() const
- public const clang::Type * getBaseType() const
- public Qualifiers::GC getObjCGCAttr() const
- public Qualifiers::ObjCLifetime getObjCLifetime() const
- public clang::Qualifiers getQualifiers() const
- public bool hasAddressSpace() const
- public bool hasObjCGCAttr() const
- public bool hasObjCLifetime() const
- private clang::ExtQuals * this_()
Inherited from FoldingSetBase::Node:
Inherited from ExtQualsTypeCommonBase:
Methods
¶ExtQuals(const clang::Type* baseType,
clang::QualType canon,
clang::Qualifiers quals)
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
void Profile(llvm::FoldingSetNodeID& ID) const
Declared at: clang/include/clang/AST/Type.h:1491
Parameters
¶static void Profile(llvm::FoldingSetNodeID& ID,
const clang::Type* BaseType,
clang::Qualifiers Quals)
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
clang::LangAS getAddressSpace() const
Declared at: clang/include/clang/AST/Type.h:1486
¶const clang::Type* getBaseType() const
const clang::Type* getBaseType() const
Declared at: clang/include/clang/AST/Type.h:1488
¶Qualifiers::GC getObjCGCAttr() const
Qualifiers::GC getObjCGCAttr() const
Declared at: clang/include/clang/AST/Type.h:1478
¶Qualifiers::ObjCLifetime getObjCLifetime() const
Qualifiers::ObjCLifetime getObjCLifetime() const
Declared at: clang/include/clang/AST/Type.h:1481
¶clang::Qualifiers getQualifiers() const
clang::Qualifiers getQualifiers() const
Declared at: clang/include/clang/AST/Type.h:1475
¶bool hasAddressSpace() const
bool hasAddressSpace() const
Declared at: clang/include/clang/AST/Type.h:1485
¶bool hasObjCGCAttr() const
bool hasObjCGCAttr() const
Declared at: clang/include/clang/AST/Type.h:1477
¶bool hasObjCLifetime() const
bool hasObjCLifetime() const
Declared at: clang/include/clang/AST/Type.h:1480
¶clang::ExtQuals* this_()
clang::ExtQuals* this_()
Declared at: clang/include/clang/AST/Type.h:1462