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
224224 // foo(123)
225225 return true ;
226226 }
227+ if (isa<CXXBoolLiteralExpr>(ArgOrigin))
228+ return true ;
227229 if (isa<ObjCStringLiteral>(ArgOrigin))
228230 return true ;
229231 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 @@ -390,17 +390,20 @@ void foo() {
390390 }
391391}
392392
393- #define YES 1
393+ #define YES __objc_yes
394+ #define NO 0
394395
395396namespace call_with_cf_constant {
396397 void bar (const NSArray *);
397398 void baz (const NSDictionary *);
398399 void boo (NSNumber *);
400+ void boo (CFTypeRef);
399401 void foo () {
400402 CFArrayCreateMutable (kCFAllocatorDefault , 10 );
401403 bar (@[@" hello" ]);
402404 baz (@{@" hello" : @3 });
403405 boo (@YES );
406+ boo (@NO );
404407 }
405408}
406409
You can’t perform that action at this time.
0 commit comments