clang 20.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::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 &, const FunctionInfo &) |
|
inline |
|
inline |
|
inline |
Definition at line 532 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 72 of file APINotesTypes.cpp.
References clang::api_notes::CommonEntityInfo::dump(), NullabilityAudited, Params, RawRetainCountConvention, and ResultType.
Referenced by clang::api_notes::ObjCMethodInfo::dump().
|
inlinestatic |
Definition at line 528 of file Types.h.
References CHAR_BIT, and NullabilityPayload.
Referenced by addTypeInfo().
|
inline |
Definition at line 560 of file Types.h.
Referenced by ProcessAPINotes().
|
inline |
Definition at line 566 of file Types.h.
References RawRetainCountConvention.
Referenced by ProcessAPINotes(), and setRetainCountConvention().
|
inline |
Definition at line 564 of file Types.h.
Referenced by ProcessAPINotes().
|
inline |
Definition at line 572 of file Types.h.
References getRetainCountConvention(), and RawRetainCountConvention.
|
friend |
unsigned clang::api_notes::FunctionInfo::NullabilityAudited |
Whether the signature has been audited with respect to nullability.
Definition at line 503 of file Types.h.
Referenced by addTypeInfo(), dump(), 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 516 of file Types.h.
Referenced by addTypeInfo(), and getMaxNullabilityIndex().
unsigned clang::api_notes::FunctionInfo::NumAdjustedNullable |
Number of types whose nullability is encoded with the NullabilityPayload.
Definition at line 506 of file Types.h.
Referenced by addTypeInfo().
std::vector<ParamInfo> clang::api_notes::FunctionInfo::Params |
The function parameters.
Definition at line 522 of file Types.h.
Referenced by dump(), and ProcessAPINotes().
unsigned clang::api_notes::FunctionInfo::RawRetainCountConvention |
A biased RetainCountConventionKind, where 0 means "unspecified".
Definition at line 509 of file Types.h.
Referenced by dump(), getRetainCountConvention(), and setRetainCountConvention().
std::string clang::api_notes::FunctionInfo::ResultType |
The result type of this function, as a C type.
Definition at line 519 of file Types.h.
Referenced by dump(), and ProcessAPINotes().