[linters] Fix one more unavailable api false positive

Reviewed By: akotulski

Differential Revision: D4578891

fbshipit-source-id: c6443a1
master
Dulma Churchill 8 years ago committed by Facebook Github Bot
parent a8be4f1f4f
commit 6c82e82444

@ -52,7 +52,9 @@ let rec get_responds_to_selector stmt =
| BinaryOperator (_, [stmt1;stmt2], _, bo_info)
when PVariant.(=) bo_info.Clang_ast_t.boi_kind `LAnd ->
List.append (get_responds_to_selector stmt1) (get_responds_to_selector stmt2)
| ImplicitCastExpr (_, [stmt], _, _) ->
| ImplicitCastExpr (_, [stmt], _, _)
| ParenExpr (_, [stmt], _)
| ExprWithCleanups(_, [stmt], _, _) ->
get_responds_to_selector stmt
| _ -> []

@ -1,7 +1,7 @@
codetoanalyze/objc/ioslints/unavailable_api_allowed_cases.m, Unavailable_api_allowed_cases_m2, 120, UNAVAILABLE_API_IN_SUPPORTED_IOS_SDK, []
codetoanalyze/objc/ioslints/unavailable_api_allowed_cases.m, Unavailable_api_allowed_cases_m3:, 128, UNAVAILABLE_API_IN_SUPPORTED_IOS_SDK, []
codetoanalyze/objc/ioslints/unavailable_api_allowed_cases.m, Unavailable_api_allowed_cases_uifont_without_respondstoselector:, 102, UNAVAILABLE_API_IN_SUPPORTED_IOS_SDK, []
codetoanalyze/objc/ioslints/unavailable_api_allowed_cases.m, Unavailable_api_allowed_cases_with_responds_to_selector_in_else:, 68, UNAVAILABLE_API_IN_SUPPORTED_IOS_SDK, []
codetoanalyze/objc/ioslints/unavailable_api_allowed_cases.m, Unavailable_api_allowed_cases_without_responds_to_selector:, 61, UNAVAILABLE_API_IN_SUPPORTED_IOS_SDK, []
codetoanalyze/objc/ioslints/unavailable_api_allowed_cases.m, Unavailable_api_allowed_cases_m2, 123, UNAVAILABLE_API_IN_SUPPORTED_IOS_SDK, []
codetoanalyze/objc/ioslints/unavailable_api_allowed_cases.m, Unavailable_api_allowed_cases_m3:, 131, UNAVAILABLE_API_IN_SUPPORTED_IOS_SDK, []
codetoanalyze/objc/ioslints/unavailable_api_allowed_cases.m, Unavailable_api_allowed_cases_uifont_without_respondstoselector:, 105, UNAVAILABLE_API_IN_SUPPORTED_IOS_SDK, []
codetoanalyze/objc/ioslints/unavailable_api_allowed_cases.m, Unavailable_api_allowed_cases_with_responds_to_selector_in_else:, 71, UNAVAILABLE_API_IN_SUPPORTED_IOS_SDK, []
codetoanalyze/objc/ioslints/unavailable_api_allowed_cases.m, Unavailable_api_allowed_cases_without_responds_to_selector:, 64, UNAVAILABLE_API_IN_SUPPORTED_IOS_SDK, []
codetoanalyze/objc/ioslints/unavailable_api_in_supported_ios_sdk.m, OpenURLOptionsFromSourceApplication, 26, UNAVAILABLE_API_IN_SUPPORTED_IOS_SDK, []
codetoanalyze/objc/ioslints/unavailable_api_in_supported_ios_sdk.m, Unavailable_api_in_supported_ios_sdk_test:and:, 19, UNAVAILABLE_API_IN_SUPPORTED_IOS_SDK, []

@ -7,6 +7,7 @@
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import <UIKit/UIKit.h>
#import <AVFoundation/AVPlayer.h>
@interface Unavailable_api_allowed_cases : NSObject
@ -14,6 +15,8 @@
- (void)n NS_AVAILABLE(10_12, 10_0);
@property(nonatomic, strong) AVPlayer* player;
@end
#define CK_AT_LEAST_IOS9 (kCFCoreFoundationVersionNumber >= 1223.1)
@ -185,4 +188,11 @@
}
}
// no bug
- (void)playInReverse {
if ([self.player respondsToSelector:@selector(playImmediatelyAtRate:)]) {
[self.player playImmediatelyAtRate:-1.0];
}
}
@end

Loading…
Cancel
Save