You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 1, 2021. It is now read-only.
AvailabilityAttr: we accept "macos" as the platform name.
We continue accepting "macosx" but canonicalize it to "macos", When emitting
diagnostics, we use "macOS" instead of "OS X".
The PlatformName in TargetInfo is changed from "macosx" to "macos" so we can
directly compare the Platform in AvailabilityAttr with the PlatformName
in TargetInfo.
rdar://26795172
rdar://26800775
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274064 91177308-0d34-0410-b5e6-96231b3b80d8
voidf0() __attribute__((availability(macosx,introduced=10.4,deprecated=10.2))); // expected-warning{{feature cannot be deprecated in OS X version 10.2 before it was introduced in version 10.4; attribute ignored}}
5
+
voidf0() __attribute__((availability(macosx,introduced=10.4,deprecated=10.2))); // expected-warning{{feature cannot be deprecated in macOS version 10.2 before it was introduced in version 10.4; attribute ignored}}
6
6
voidf1() __attribute__((availability(ios,obsoleted=2.1,deprecated=3.0))); // expected-warning{{feature cannot be obsoleted in iOS version 2.1 before it was deprecated in version 3.0; attribute ignored}}
ATSFontGetName("Hello"); // expected-warning {{'ATSFontGetName' is deprecated: first deprecated in OS X 9.0 - use CTFontCopyFullName}}
30
-
ATSFontGetPostScriptName(100); // expected-error {{'ATSFontGetPostScriptName' is unavailable: obsoleted in OS X 9.0 - use ATSFontGetFullPostScriptName}}
29
+
ATSFontGetName("Hello"); // expected-warning {{'ATSFontGetName' is deprecated: first deprecated in macOS 9.0 - use CTFontCopyFullName}}
30
+
ATSFontGetPostScriptName(100); // expected-error {{'ATSFontGetPostScriptName' is unavailable: obsoleted in macOS 9.0 - use ATSFontGetFullPostScriptName}}
31
31
32
32
#if defined(WARN_PARTIAL)
33
-
// expected-warning@+2 {{is partial: introduced in OS X 10.8}} expected-note@+2 {{explicitly redeclare 'PartiallyAvailable' to silence this warning}}
33
+
// expected-warning@+2 {{is partial: introduced in macOS 10.8}} expected-note@+2 {{explicitly redeclare 'PartiallyAvailable' to silence this warning}}
Copy file name to clipboardExpand all lines: test/SemaObjC/attr-availability-1.m
+9-9
Original file line number
Diff line number
Diff line change
@@ -25,19 +25,19 @@ - (void)overridden6 __attribute__((availability(macosx,introduced=10_3))); // ex
25
25
// rdar://11475360
26
26
@interfaceB : A
27
27
- (void)method; // NOTE: we expect 'method' to *not* inherit availability.
28
-
- (void)overridden __attribute__((availability(macosx,introduced=10_4))); // expected-warning{{overriding method introduced after overridden method on OS X (10_4 vs. 10_3)}}
28
+
- (void)overridden __attribute__((availability(macosx,introduced=10_4))); // expected-warning{{overriding method introduced after overridden method on macOS (10_4 vs. 10_3)}}
- (void)overridden4 __attribute__((availability(macosx,deprecated=10_2))); // expected-warning{{overriding method deprecated before overridden method on OS X (10_3 vs. 10_2)}}
31
+
- (void)overridden4 __attribute__((availability(macosx,deprecated=10_2))); // expected-warning{{overriding method deprecated before overridden method on macOS (10_3 vs. 10_2)}}
- (void)overridden6 __attribute__((availability(macosx,unavailable))); // expected-warning{{overriding method cannot be unavailable on OS X when its overridden method is available}}
33
+
- (void)overridden6 __attribute__((availability(macosx,unavailable))); // expected-warning{{overriding method cannot be unavailable on macOS when its overridden method is available}}
34
34
@end
35
35
36
36
voidf(A *a, B *b) {
37
-
[a method]; // expected-warning{{'method' is deprecated: first deprecated in OS X 10.2}}
37
+
[a method]; // expected-warning{{'method' is deprecated: first deprecated in macOS 10.2}}
38
38
[b method]; // no-warning
39
-
[a proto_method]; // expected-warning{{'proto_method' is deprecated: first deprecated in OS X 10.2}}
40
-
[b proto_method]; // expected-warning{{'proto_method' is deprecated: first deprecated in OS X 10.2}}
39
+
[a proto_method]; // expected-warning{{'proto_method' is deprecated: first deprecated in macOS 10.2}}
40
+
[b proto_method]; // expected-warning{{'proto_method' is deprecated: first deprecated in macOS 10.2}}
41
41
}
42
42
43
43
// Test case for <rdar://problem/11627873>. Warn about
@@ -57,7 +57,7 @@ - (void) method;
57
57
58
58
@implementationD
59
59
- (void) method {
60
-
[supermethod]; // expected-warning {{'method' is deprecated: first deprecated in OS X 10.2}}
60
+
[supermethod]; // expected-warning {{'method' is deprecated: first deprecated in macOS 10.2}}
0 commit comments