comparison clang/test/SemaObjC/unguarded-availability-new.m @ 236:c4bab56944e8 llvm-original

LLVM 16
author kono
date Wed, 09 Nov 2022 17:45:10 +0900
parents 1d019706d866
children
comparison
equal deleted inserted replaced
232:70dce7da266c 236:c4bab56944e8
64 #define AVAILABLE_PREV __attribute__((availability(watchos, introduced = 3))) 64 #define AVAILABLE_PREV __attribute__((availability(watchos, introduced = 3)))
65 #define AVAILABLE_CURRENT __attribute__((availability(watchos, introduced = 4))) 65 #define AVAILABLE_CURRENT __attribute__((availability(watchos, introduced = 4)))
66 #define AVAILABLE_NEXT __attribute__((availability(watchos, introduced = 5))) 66 #define AVAILABLE_NEXT __attribute__((availability(watchos, introduced = 5)))
67 #endif 67 #endif
68 68
69 void previouslyAvailable() AVAILABLE_PREV; 69 void previouslyAvailable(void) AVAILABLE_PREV;
70 #ifdef WARN_PREV 70 #ifdef WARN_PREV
71 // expected-note@-2 {{'previouslyAvailable' has been marked as being introduced}} 71 // expected-note@-2 {{'previouslyAvailable' has been marked as being introduced}}
72 #endif 72 #endif
73 void currentlyAvailable() AVAILABLE_CURRENT; 73 void currentlyAvailable(void) AVAILABLE_CURRENT;
74 #ifdef WARN_CURRENT 74 #ifdef WARN_CURRENT
75 // expected-note@-2 {{'currentlyAvailable' has been marked as being introduced}} 75 // expected-note@-2 {{'currentlyAvailable' has been marked as being introduced}}
76 #endif 76 #endif
77 void willBeAvailabile() AVAILABLE_NEXT; 77 void willBeAvailabile(void) AVAILABLE_NEXT;
78 #ifndef NO_WARNING 78 #ifndef NO_WARNING
79 // expected-note@-2 {{'willBeAvailabile' has been marked as being introduced in}} 79 // expected-note@-2 {{'willBeAvailabile' has been marked as being introduced in}}
80 #endif 80 #endif
81 81
82 #ifdef TEST_FUNC_CURRENT 82 #ifdef TEST_FUNC_CURRENT
107 #ifdef WATCHOS 107 #ifdef WATCHOS
108 // expected-warning@-12 {{'new_int' is only available on watchOS 5}} expected-note@-12 {{annotate 'x' with an availability attribute to silence this warning}} 108 // expected-warning@-12 {{'new_int' is only available on watchOS 5}} expected-note@-12 {{annotate 'x' with an availability attribute to silence this warning}}
109 #endif 109 #endif
110 #endif 110 #endif
111 111
112 void test() FUNC_AVAILABLE { 112 void test(void) FUNC_AVAILABLE {
113 previouslyAvailable(); 113 previouslyAvailable();
114 #ifdef WARN_PREV 114 #ifdef WARN_PREV
115 #ifdef MAC 115 #ifdef MAC
116 // expected-warning@-3 {{'previouslyAvailable' is only available on macOS 10.12 or newer}} 116 // expected-warning@-3 {{'previouslyAvailable' is only available on macOS 10.12 or newer}}
117 #endif 117 #endif