File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed
lib/StaticAnalyzer/Checkers/WebKit
test/Analysis/Checkers/WebKit Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -224,6 +224,8 @@ class RawPtrRefCallArgsChecker
224
224
// foo(123)
225
225
return true ;
226
226
}
227
+ if (isa<CXXBoolLiteralExpr>(ArgOrigin))
228
+ return true ;
227
229
if (isa<ObjCStringLiteral>(ArgOrigin))
228
230
return true ;
229
231
if (isASafeCallArg (ArgOrigin))
Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ __attribute__((objc_root_class))
160
160
- (int )intValue ;
161
161
- (id )initWithInt : (int )value ;
162
162
+ (NSNumber *)numberWithInt : (int )value ;
163
+ + (NSNumber *)numberWithBool : (BOOL )value ;
163
164
@end
164
165
165
166
@interface SomeObj : NSObject
Original file line number Diff line number Diff line change @@ -390,17 +390,20 @@ void foo() {
390
390
}
391
391
}
392
392
393
- #define YES 1
393
+ #define YES __objc_yes
394
+ #define NO 0
394
395
395
396
namespace call_with_cf_constant {
396
397
void bar (const NSArray *);
397
398
void baz (const NSDictionary *);
398
399
void boo (NSNumber *);
400
+ void boo (CFTypeRef);
399
401
void foo () {
400
402
CFArrayCreateMutable (kCFAllocatorDefault , 10 );
401
403
bar (@[@" hello" ]);
402
404
baz (@{@" hello" : @3 });
403
405
boo (@YES );
406
+ boo (@NO );
404
407
}
405
408
}
406
409
You can’t perform that action at this time.
0 commit comments