clang 20.0.0git
Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
clang::AvailabilityInfo Struct Reference

Storage of availability attributes for a declaration. More...

#include "clang/AST/Availability.h"

Public Member Functions

 AvailabilityInfo ()=default
 
bool isDefault () const
 Determine if this AvailabilityInfo represents the default availability.
 
bool isObsoleted () const
 Check if the symbol has been obsoleted.
 
bool isUnavailable () const
 Check if the symbol is unavailable unconditionally or on the active platform and os version.
 
bool isUnconditionallyDeprecated () const
 Check if the symbol is unconditionally deprecated.
 
bool isUnconditionallyUnavailable () const
 Check if the symbol is unconditionally unavailable.
 
void mergeWith (AvailabilityInfo Other)
 Augments the existing information with additional constraints provided by Other.
 
 AvailabilityInfo (StringRef Domain, VersionTuple I, VersionTuple D, VersionTuple O, bool U, bool UD, bool UU)
 

Static Public Member Functions

static AvailabilityInfo createFromDecl (const Decl *Decl)
 

Public Attributes

llvm::SmallString< 32 > Domain
 The domain is the platform for which this availability info applies to.
 
VersionTuple Introduced
 
VersionTuple Deprecated
 
VersionTuple Obsoleted
 
bool Unavailable = false
 
bool UnconditionallyDeprecated = false
 
bool UnconditionallyUnavailable = false
 

Friends

bool operator== (const AvailabilityInfo &Lhs, const AvailabilityInfo &Rhs)
 

Detailed Description

Storage of availability attributes for a declaration.

Definition at line 64 of file Availability.h.

Constructor & Destructor Documentation

◆ AvailabilityInfo() [1/2]

clang::AvailabilityInfo::AvailabilityInfo ( )
default

Referenced by isDefault().

◆ AvailabilityInfo() [2/2]

clang::AvailabilityInfo::AvailabilityInfo ( StringRef  Domain,
VersionTuple  I,
VersionTuple  D,
VersionTuple  O,
bool  U,
bool  UD,
bool  UU 
)
inline

Definition at line 104 of file Availability.h.

Member Function Documentation

◆ createFromDecl()

AvailabilityInfo clang::AvailabilityInfo::createFromDecl ( const Decl Decl)
static

Definition at line 97 of file Availability.cpp.

References D, UnconditionallyDeprecated, and UnconditionallyUnavailable.

Referenced by clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::recordEnumConstants(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::recordObjCInstanceVariables(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::recordObjCMethods(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::recordObjCProperties(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitClassTemplatePartialSpecializationDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitClassTemplateSpecializationDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitConceptDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitCXXConstructorDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitCXXConversionDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitCXXDestructorDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitCXXMethodDecl(), clang::installapi::InstallAPIVisitor::VisitCXXRecordDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitCXXRecordDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitEnumDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitFieldDecl(), clang::installapi::InstallAPIVisitor::VisitFunctionDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitFunctionDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitFunctionTemplateDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitNamespaceDecl(), clang::installapi::InstallAPIVisitor::VisitObjCCategoryDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitObjCCategoryDecl(), clang::installapi::InstallAPIVisitor::VisitObjCInterfaceDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitObjCInterfaceDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitObjCProtocolDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitRecordDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitTypedefNameDecl(), clang::installapi::InstallAPIVisitor::VisitVarDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitVarDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitVarTemplateDecl(), clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitVarTemplatePartialSpecializationDecl(), and clang::extractapi::impl::ExtractAPIVisitorBase< Derived >::VisitVarTemplateSpecializationDecl().

◆ isDefault()

bool clang::AvailabilityInfo::isDefault ( ) const
inline

Determine if this AvailabilityInfo represents the default availability.

Definition at line 77 of file Availability.h.

References AvailabilityInfo().

Referenced by mergeWith().

◆ isObsoleted()

bool clang::AvailabilityInfo::isObsoleted ( ) const
inline

Check if the symbol has been obsoleted.

Definition at line 80 of file Availability.h.

References Obsoleted.

◆ isUnavailable()

bool clang::AvailabilityInfo::isUnavailable ( ) const
inline

Check if the symbol is unavailable unconditionally or on the active platform and os version.

Definition at line 84 of file Availability.h.

References isUnconditionallyUnavailable(), and Unavailable.

◆ isUnconditionallyDeprecated()

bool clang::AvailabilityInfo::isUnconditionallyDeprecated ( ) const
inline

Check if the symbol is unconditionally deprecated.

i.e.

__attribute__((deprecated))
_Float16 __2f16 __attribute__((ext_vector_type(2)))
Zeroes the upper 128 bits (bits 255:128) of all YMM registers.

Definition at line 91 of file Availability.h.

References UnconditionallyDeprecated.

◆ isUnconditionallyUnavailable()

bool clang::AvailabilityInfo::isUnconditionallyUnavailable ( ) const
inline

Check if the symbol is unconditionally unavailable.

i.e.

__attribute__((unavailable))

Definition at line 96 of file Availability.h.

References UnconditionallyUnavailable.

Referenced by isUnavailable().

◆ mergeWith()

void clang::AvailabilityInfo::mergeWith ( AvailabilityInfo  Other)

Augments the existing information with additional constraints provided by Other.

Definition at line 70 of file Availability.cpp.

References Deprecated, Domain, Introduced, isDefault(), Obsoleted, clang::Other, Unavailable, UnconditionallyDeprecated, and UnconditionallyUnavailable.

Friends And Related Function Documentation

◆ operator==

bool operator== ( const AvailabilityInfo Lhs,
const AvailabilityInfo Rhs 
)
friend

Definition at line 117 of file Availability.h.

Member Data Documentation

◆ Deprecated

VersionTuple clang::AvailabilityInfo::Deprecated

Definition at line 68 of file Availability.h.

Referenced by mergeWith().

◆ Domain

llvm::SmallString<32> clang::AvailabilityInfo::Domain

The domain is the platform for which this availability info applies to.

Definition at line 66 of file Availability.h.

Referenced by mergeWith().

◆ Introduced

VersionTuple clang::AvailabilityInfo::Introduced

Definition at line 67 of file Availability.h.

Referenced by mergeWith().

◆ Obsoleted

VersionTuple clang::AvailabilityInfo::Obsoleted

Definition at line 69 of file Availability.h.

Referenced by isObsoleted(), and mergeWith().

◆ Unavailable

bool clang::AvailabilityInfo::Unavailable = false

Definition at line 70 of file Availability.h.

Referenced by isUnavailable(), and mergeWith().

◆ UnconditionallyDeprecated

bool clang::AvailabilityInfo::UnconditionallyDeprecated = false

Definition at line 71 of file Availability.h.

Referenced by createFromDecl(), isUnconditionallyDeprecated(), and mergeWith().

◆ UnconditionallyUnavailable

bool clang::AvailabilityInfo::UnconditionallyUnavailable = false

Definition at line 72 of file Availability.h.

Referenced by createFromDecl(), isUnconditionallyUnavailable(), and mergeWith().


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