clang 22.0.0git
clang::api_notes::ContextInfo Class Reference

Describes API notes data for an Objective-C class or protocol or a C++ namespace. More...

#include "clang/APINotes/Types.h"

Inheritance diagram for clang::api_notes::ContextInfo:
[legend]

Public Member Functions

 ContextInfo ()
std::optional< NullabilityKindgetDefaultNullability () const
 Determine the default nullability for properties and methods of this class.
void setDefaultNullability (NullabilityKind Kind)
 Set the default nullability for properties and methods of this class.
bool hasDesignatedInits () const
void setHasDesignatedInits (bool Value)
std::optional< boolgetSwiftImportAsNonGeneric () const
void setSwiftImportAsNonGeneric (std::optional< bool > Value)
std::optional< boolgetSwiftObjCMembers () const
void setSwiftObjCMembers (std::optional< bool > Value)
ContextInfooperator|= (const ContextInfo &RHS)
LLVM_DUMP_METHOD void dump (llvm::raw_ostream &OS)
Public Member Functions inherited from clang::api_notes::CommonTypeInfo
 CommonTypeInfo ()
const std::optional< std::string > & getSwiftBridge () const
void setSwiftBridge (std::optional< std::string > SwiftType)
const std::optional< std::string > & getNSErrorDomain () const
void setNSErrorDomain (const std::optional< std::string > &Domain)
void setNSErrorDomain (const std::optional< llvm::StringRef > &Domain)
std::optional< std::string > getSwiftConformance () const
void setSwiftConformance (std::optional< std::string > conformance)
CommonTypeInfooperator|= (const CommonTypeInfo &RHS)
LLVM_DUMP_METHOD void dump (llvm::raw_ostream &OS) const
Public Member Functions inherited from clang::api_notes::CommonEntityInfo
 CommonEntityInfo ()
std::optional< boolisSwiftPrivate () const
void setSwiftPrivate (std::optional< bool > Private)
std::optional< SwiftSafetyKindgetSwiftSafety () const
void setSwiftSafety (SwiftSafetyKind Safety)
CommonEntityInfooperator|= (const CommonEntityInfo &RHS)
LLVM_DUMP_METHOD void dump (llvm::raw_ostream &OS) const

Friends

bool operator== (const ContextInfo &LHS, const ContextInfo &RHS)

Additional Inherited Members

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.

Detailed Description

Describes API notes data for an Objective-C class or protocol or a C++ namespace.

Definition at line 235 of file Types.h.

Constructor & Destructor Documentation

◆ ContextInfo()

clang::api_notes::ContextInfo::ContextInfo ( )
inline

Definition at line 259 of file Types.h.

References false.

Referenced by operator==, and operator|=().

Member Function Documentation

◆ dump()

LLVM_DUMP_METHOD void clang::api_notes::ContextInfo::dump ( llvm::raw_ostream & OS)

◆ getDefaultNullability()

std::optional< NullabilityKind > clang::api_notes::ContextInfo::getDefaultNullability ( ) const
inline

Determine the default nullability for properties and methods of this class.

Returns the default nullability, if implied, or std::nullopt if there is none.

Definition at line 269 of file Types.h.

Referenced by operator==, operator|=(), clang::api_notes::ObjCMethodInfo::operator|=(), and clang::api_notes::ObjCPropertyInfo::operator|=().

◆ getSwiftImportAsNonGeneric()

std::optional< bool > clang::api_notes::ContextInfo::getSwiftImportAsNonGeneric ( ) const
inline

Definition at line 285 of file Types.h.

Referenced by operator==, operator|=(), and ProcessAPINotes().

◆ getSwiftObjCMembers()

std::optional< bool > clang::api_notes::ContextInfo::getSwiftObjCMembers ( ) const
inline

Definition at line 295 of file Types.h.

Referenced by operator==, operator|=(), and ProcessAPINotes().

◆ hasDesignatedInits()

bool clang::api_notes::ContextInfo::hasDesignatedInits ( ) const
inline

Definition at line 282 of file Types.h.

◆ operator|=()

◆ setDefaultNullability()

void clang::api_notes::ContextInfo::setDefaultNullability ( NullabilityKind Kind)
inline

Set the default nullability for properties and methods of this class.

Definition at line 277 of file Types.h.

Referenced by operator|=().

◆ setHasDesignatedInits()

void clang::api_notes::ContextInfo::setHasDesignatedInits ( bool Value)
inline

Definition at line 283 of file Types.h.

◆ setSwiftImportAsNonGeneric()

void clang::api_notes::ContextInfo::setSwiftImportAsNonGeneric ( std::optional< bool > Value)
inline

Definition at line 290 of file Types.h.

Referenced by operator|=().

◆ setSwiftObjCMembers()

void clang::api_notes::ContextInfo::setSwiftObjCMembers ( std::optional< bool > Value)
inline

Definition at line 299 of file Types.h.

Referenced by operator|=().

◆ operator==


The documentation for this class was generated from the following files: