class FunctionType::ExtParameterInfo
Declaration
class FunctionType::ExtParameterInfo { /* full declaration omitted */ };
Description
Interesting information about a specific parameter that can't simply be reflected in parameter's type. This is only used by FunctionProtoType but is in FunctionType to make this class available during the specification of the bases of FunctionProtoType. It makes sense to model language features this way when there's some sort of parameter-specific override (such as an attribute) that affects how the function is called. For example, the ARC ns_consumed attribute changes whether a parameter is passed at +0 (the default) or +1 (ns_consumed). This must be reflected in the function type, but isn't really a change to the parameter type. One serious disadvantage of modelling language features this way is that they generally do not work with language features that attempt to destructure types. For example, template argument deduction will not be able to match a parameter declared as T (*)(U) against an argument of type void (*)(__attribute__((ns_consumed)) id) because the substitution of T=void, U=id into the former will not produce the latter.
Declared at: clang/include/clang/AST/Type.h:3644
Member Variables
- private unsigned char Data = 0
Method Overview
- public ExtParameterInfo()
- public clang::ParameterABI getABI() const
- public static clang::FunctionType::ExtParameterInfo getFromOpaqueValue(unsigned char data)
- public unsigned char getOpaqueValue() const
- public bool hasPassObjectSize() const
- public bool isConsumed() const
- public bool isNoEscape() const
- public clang::FunctionType::ExtParameterInfo withABI(clang::ParameterABI kind) const
- public clang::FunctionType::ExtParameterInfo withHasPassObjectSize() const
- public clang::FunctionType::ExtParameterInfo withIsConsumed(bool consumed) const
- public clang::FunctionType::ExtParameterInfo withIsNoEscape(bool NoEscape) const
Methods
¶ExtParameterInfo()
ExtParameterInfo()
Declared at: clang/include/clang/AST/Type.h:3654
¶clang::ParameterABI getABI() const
clang::ParameterABI getABI() const
Description
Return the ABI treatment of this parameter.
Declared at: clang/include/clang/AST/Type.h:3657
¶static clang::FunctionType::ExtParameterInfo
getFromOpaqueValue(unsigned char data)
static clang::FunctionType::ExtParameterInfo
getFromOpaqueValue(unsigned char data)
Declared at: clang/include/clang/AST/Type.h:3694
Parameters
- unsigned char data
¶unsigned char getOpaqueValue() const
unsigned char getOpaqueValue() const
Declared at: clang/include/clang/AST/Type.h:3693
¶bool hasPassObjectSize() const
bool hasPassObjectSize() const
Declared at: clang/include/clang/AST/Type.h:3676
¶bool isConsumed() const
bool isConsumed() const
Description
Is this parameter considered "consumed" by Objective-C ARC? Consumed parameters must have retainable object type.
Declared at: clang/include/clang/AST/Type.h:3666
¶bool isNoEscape() const
bool isNoEscape() const
Declared at: clang/include/clang/AST/Type.h:3683
¶clang::FunctionType::ExtParameterInfo withABI(
clang::ParameterABI kind) const
clang::FunctionType::ExtParameterInfo withABI(
clang::ParameterABI kind) const
Declared at: clang/include/clang/AST/Type.h:3658
Parameters
- clang::ParameterABI kind
¶clang::FunctionType::ExtParameterInfo
withHasPassObjectSize() const
clang::FunctionType::ExtParameterInfo
withHasPassObjectSize() const
Declared at: clang/include/clang/AST/Type.h:3677
¶clang::FunctionType::ExtParameterInfo
withIsConsumed(bool consumed) const
clang::FunctionType::ExtParameterInfo
withIsConsumed(bool consumed) const
Declared at: clang/include/clang/AST/Type.h:3667
Parameters
- bool consumed
¶clang::FunctionType::ExtParameterInfo
withIsNoEscape(bool NoEscape) const
clang::FunctionType::ExtParameterInfo
withIsNoEscape(bool NoEscape) const
Declared at: clang/include/clang/AST/Type.h:3684
Parameters
- bool NoEscape