class AvailabilitySpec

Declaration

class AvailabilitySpec { /* full declaration omitted */ };

Description

One specifier in an @availableexpression. Here, 'macos 10.10' and '*' both map to an instance of this type.

Declared at: clang/include/clang/AST/Availability.h:30

Member Variables

private llvm::VersionTuple Version
Represents the version that this specifier requires. If the host OS version is greater than or equal to Version, the @availablewill evaluate to true.
private llvm::StringRef Platform
Name of the platform that Version corresponds to.
private clang::SourceLocation BeginLoc
private clang::SourceLocation EndLoc

Method Overview

Methods

AvailabilitySpec(llvm::VersionTuple Version,
                 llvm::StringRef Platform,
                 clang::SourceLocation BeginLoc,
                 clang::SourceLocation EndLoc)

Declared at: clang/include/clang/AST/Availability.h:42

Parameters

llvm::VersionTuple Version
llvm::StringRef Platform
clang::SourceLocation BeginLoc
clang::SourceLocation EndLoc

AvailabilitySpec(clang::SourceLocation StarLoc)

Description

This constructor is used when representing the '*' case.

Declared at: clang/include/clang/AST/Availability.h:48

Parameters

clang::SourceLocation StarLoc

clang::SourceLocation getBeginLoc() const

Declared at: clang/include/clang/AST/Availability.h:53

clang::SourceLocation getEndLoc() const

Declared at: clang/include/clang/AST/Availability.h:54

llvm::StringRef getPlatform() const

Declared at: clang/include/clang/AST/Availability.h:52

llvm::VersionTuple getVersion() const

Declared at: clang/include/clang/AST/Availability.h:51

bool isOtherPlatformSpec() const

Description

Returns true when this represents the '*' case.

Declared at: clang/include/clang/AST/Availability.h:57