clang 22.0.0git
|
API notes for a function or method. More...
#include "clang/APINotes/Types.h"
Public Member Functions | |
FunctionInfo () | |
void | addTypeInfo (unsigned index, NullabilityKind kind) |
void | addReturnTypeInfo (NullabilityKind kind) |
Adds the return type info. | |
void | addParamTypeInfo (unsigned index, NullabilityKind kind) |
Adds the parameter type info. | |
NullabilityKind | getParamTypeInfo (unsigned index) const |
NullabilityKind | getReturnTypeInfo () const |
std::optional< RetainCountConventionKind > | getRetainCountConvention () const |
void | setRetainCountConvention (std::optional< RetainCountConventionKind > Value) |
LLVM_DUMP_METHOD void | dump (llvm::raw_ostream &OS) const |
Public Member Functions inherited from clang::api_notes::CommonEntityInfo | |
CommonEntityInfo () | |
std::optional< bool > | isSwiftPrivate () const |
void | setSwiftPrivate (std::optional< bool > Private) |
CommonEntityInfo & | operator|= (const CommonEntityInfo &RHS) |
LLVM_DUMP_METHOD void | dump (llvm::raw_ostream &OS) const |
Static Public Member Functions | |
static unsigned | getMaxNullabilityIndex () |
Public Attributes | |
unsigned | NullabilityAudited: 1 |
Whether the signature has been audited with respect to nullability. | |
unsigned | NumAdjustedNullable: 8 |
Number of types whose nullability is encoded with the NullabilityPayload. | |
unsigned | RawRetainCountConvention: 3 |
A biased RetainCountConventionKind, where 0 means "unspecified". | |
uint64_t | NullabilityPayload = 0 |
Stores the nullability of the return type and the parameters. | |
std::string | ResultType |
The result type of this function, as a C type. | |
std::string | SwiftReturnOwnership |
Ownership convention for return value. | |
std::vector< ParamInfo > | Params |
The function parameters. | |
Public Attributes inherited from clang::api_notes::CommonEntityInfo | |
std::string | UnavailableMsg |
Message to use when this entity is unavailable. | |
unsigned | Unavailable: 1 |
Whether this entity is marked unavailable. | |
unsigned | UnavailableInSwift: 1 |
Whether this entity is marked unavailable in Swift. | |
std::string | SwiftName |
Swift name of this entity. |
Friends | |
bool | operator== (const FunctionInfo &LHS, const FunctionInfo &RHS) |
|
inline |
Definition at line 565 of file Types.h.
References false, FunctionInfo(), NullabilityAudited, NumAdjustedNullable, and RawRetainCountConvention.
Referenced by clang::api_notes::CXXMethodInfo::dump(), clang::api_notes::ObjCMethodInfo::dump(), FunctionInfo(), operator==, and clang::api_notes::ObjCMethodInfo::operator==.
|
inline |
|
inline |
|
inline |
Definition at line 573 of file Types.h.
References getMaxNullabilityIndex(), NullabilityAudited, NullabilityPayload, and NumAdjustedNullable.
Referenced by addParamTypeInfo(), addReturnTypeInfo(), and clang::api_notes::ObjCMethodInfo::operator|=().
LLVM_DUMP_METHOD void clang::api_notes::FunctionInfo::dump | ( | llvm::raw_ostream & | OS | ) | const |
Definition at line 74 of file APINotesTypes.cpp.
References clang::api_notes::CommonEntityInfo::CommonEntityInfo(), NullabilityAudited, Params, RawRetainCountConvention, ResultType, and SwiftReturnOwnership.
|
inlinestatic |
Definition at line 569 of file Types.h.
References CHAR_BIT, and NullabilityPayload.
Referenced by addTypeInfo().
|
inline |
Definition at line 601 of file Types.h.
Referenced by ProcessAPINotes().
|
inline |
Definition at line 607 of file Types.h.
References RawRetainCountConvention.
Referenced by ProcessAPINotes(), and setRetainCountConvention().
|
inline |
Definition at line 605 of file Types.h.
Referenced by ProcessAPINotes().
|
inline |
Definition at line 613 of file Types.h.
References getRetainCountConvention(), and RawRetainCountConvention.
|
friend |
Definition at line 636 of file Types.h.
References clang::api_notes::CommonEntityInfo::CommonEntityInfo(), FunctionInfo(), NullabilityAudited, NullabilityPayload, NumAdjustedNullable, Params, RawRetainCountConvention, ResultType, and SwiftReturnOwnership.
unsigned clang::api_notes::FunctionInfo::NullabilityAudited |
Whether the signature has been audited with respect to nullability.
Definition at line 541 of file Types.h.
Referenced by addTypeInfo(), dump(), FunctionInfo(), operator==, clang::api_notes::ObjCMethodInfo::operator|=(), and ProcessAPINotes().
uint64_t clang::api_notes::FunctionInfo::NullabilityPayload = 0 |
Stores the nullability of the return type and the parameters.
Definition at line 554 of file Types.h.
Referenced by addTypeInfo(), getMaxNullabilityIndex(), and operator==.
unsigned clang::api_notes::FunctionInfo::NumAdjustedNullable |
Number of types whose nullability is encoded with the NullabilityPayload.
Definition at line 544 of file Types.h.
Referenced by addTypeInfo(), FunctionInfo(), and operator==.
std::vector<ParamInfo> clang::api_notes::FunctionInfo::Params |
The function parameters.
Definition at line 563 of file Types.h.
Referenced by dump(), operator==, and ProcessAPINotes().
unsigned clang::api_notes::FunctionInfo::RawRetainCountConvention |
A biased RetainCountConventionKind, where 0 means "unspecified".
Definition at line 547 of file Types.h.
Referenced by dump(), FunctionInfo(), getRetainCountConvention(), operator==, and setRetainCountConvention().
std::string clang::api_notes::FunctionInfo::ResultType |
The result type of this function, as a C type.
Definition at line 557 of file Types.h.
Referenced by dump(), operator==, and ProcessAPINotes().
std::string clang::api_notes::FunctionInfo::SwiftReturnOwnership |
Ownership convention for return value.
Definition at line 560 of file Types.h.
Referenced by dump(), operator==, and ProcessAPINotes().