]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/SemaObjC/unguarded-availability-category-protocol-use.m
Vendor import of clang trunk r338150:
[FreeBSD/FreeBSD.git] / test / SemaObjC / unguarded-availability-category-protocol-use.m
1 // RUN: %clang_cc1 -triple arm64-apple-ios10 -Wunguarded-availability -fblocks -fsyntax-only -verify %s
2
3 __attribute__((availability(ios,unavailable)))
4 @protocol Prot // expected-note {{here}}
5
6 @end
7
8 @interface A
9 @end
10
11 __attribute__((availability(ios,unavailable)))
12 @interface A (Cat) <Prot> // No error.
13 @end
14
15 __attribute__((availability(tvos,unavailable)))
16 @interface B @end
17 @interface B (Cat) <Prot> // expected-error {{'Prot' is unavailable: not available on iOS}}
18 @end