Reviewed By: jvillard Differential Revision: D8951773 fbshipit-source-id: ce0d1f08cmaster
parent
83a4a8fa5b
commit
ee7f07a1a9
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2018-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
#import <Foundation/NSString.h>
|
||||
|
||||
typedef struct {
|
||||
const char* name;
|
||||
} name_t;
|
||||
|
||||
static void CFunWithBlockOk(void (^cb)(void)) {
|
||||
name_t const* ns = NULL;
|
||||
name_t n = ns[0]; // Lfield accessor (needs to be specialized correctly)
|
||||
if (n.name != nil && cb != NULL)
|
||||
cb();
|
||||
}
|
||||
|
||||
@interface A : NSObject
|
||||
- (void)mOk;
|
||||
@end
|
||||
|
||||
@implementation A
|
||||
- (void)mOk {
|
||||
CFunWithBlockOk(^(void){
|
||||
});
|
||||
}
|
||||
@end
|
@ -1,2 +1,4 @@
|
||||
codetoanalyze/objcpp/errors/BlockLfield.mm, A_mOk, 1, PRECONDITION_NOT_FOUND, no_bucket, ERROR, [start of procedure mOk]
|
||||
codetoanalyze/objcpp/errors/BlockLfield.mm, CFunWithBlockOk, 2, PRECONDITION_NOT_MET, no_bucket, WARNING, [start of procedure CFunWithBlockOk()]
|
||||
codetoanalyze/objcpp/errors/c_functions.mm, main, 4, NULL_DEREFERENCE, B5, ERROR, [start of procedure main(),start of procedure autoUpdating,return from a call to A_autoUpdating,start of procedure autoUpdating2,Skipping dispatch_once2(): method has no implementation,return from a call to A_autoUpdating2,Executing synthesized getter block,start of procedure block,return from a call to objc_blockobjc_blockA_autoUpdating_1_2,Message block with receiver nil returns nil.]
|
||||
codetoanalyze/objcpp/errors/retain_cycles/RetainCycleWithStruct.mm, Animation_tracer, 2, RETAIN_CYCLE, no_bucket, ERROR, [start of procedure tracer,start of procedure _State,return from a call to _State__State,start of procedure initWithAnimation:,Taking true branch,return from a call to Tracer_initWithAnimation:]
|
||||
|
Loading…
Reference in new issue