aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjC/unguarded-availability-category-protocol-use.m
blob: d2eb9f4841be17c2e9c394c34f225fb982bd3a8f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// RUN: %clang_cc1 -triple arm64-apple-ios10 -Wunguarded-availability -fblocks -fsyntax-only -verify %s

__attribute__((availability(ios,unavailable)))
@protocol Prot // expected-note {{here}}

@end

@interface A
@end

__attribute__((availability(ios,unavailable)))
@interface A (Cat) <Prot> // No error.
@end

__attribute__((availability(tvos,unavailable)))
@interface B @end
@interface B (Cat) <Prot> // expected-error {{'Prot' is unavailable: not available on iOS}}
@end