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 @@ -229,6 +229,8 @@ class RawPtrRefCallArgsChecker
229229 // foo(123)
230230 return true ;
231231 }
232+ if (isa<CXXBoolLiteralExpr>(ArgOrigin))
233+ return true ;
232234 if (isa<ObjCStringLiteral>(ArgOrigin))
233235 return true ;
234236 if (isASafeCallArg (ArgOrigin))
Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ __attribute__((objc_root_class))
160160- (int )intValue ;
161161- (id )initWithInt : (int )value ;
162162+ (NSNumber *)numberWithInt : (int )value ;
163+ + (NSNumber *)numberWithBool : (BOOL )value ;
163164@end
164165
165166@interface SomeObj : NSObject
Original file line number Diff line number Diff line change @@ -389,17 +389,20 @@ void foo() {
389389 }
390390}
391391
392- #define YES 1
392+ #define YES __objc_yes
393+ #define NO 0
393394
394395namespace call_with_cf_constant {
395396 void bar (const NSArray *);
396397 void baz (const NSDictionary *);
397398 void boo (NSNumber *);
399+ void boo (CFTypeRef);
398400 void foo () {
399401 CFArrayCreateMutable (kCFAllocatorDefault , 10 );
400402 bar (@[@" hello" ]);
401403 baz (@{@" hello" : @3 });
402404 boo (@YES );
405+ boo (@NO );
403406 }
404407}
405408
You can’t perform that action at this time.
0 commit comments