String comparison cleanups.
Added test case. llvm-svn: 50711
This commit is contained in:
parent
041d02201f
commit
2f08fedec1
|
|
@ -636,7 +636,7 @@ RetainSummaryManager::getInstanceMethodSummary(IdentifierInfo* ClsName,
|
|||
if (s[0] == '\0')
|
||||
break;
|
||||
|
||||
if (s[0]!='W' || s[1]!='i' || s[2]!='t' || s[3]!='h')
|
||||
if (!strncmp(s, "With", 4))
|
||||
break;
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
#include <CoreFoundation/CFDate.h>
|
||||
#include <Foundation/NSDate.h>
|
||||
#include <Foundation/NSCalendarDate.h>
|
||||
#include <Foundation/NSString.h>
|
||||
|
||||
CFAbsoluteTime f1() {
|
||||
CFAbsoluteTime t = CFAbsoluteTimeGetCurrent();
|
||||
|
|
@ -102,3 +104,12 @@ NSDate* f8(int x) {
|
|||
return date; // expected-warning{{leak}}
|
||||
}
|
||||
|
||||
NSDate* f9(int x) {
|
||||
|
||||
NSDate* date = [NSDate dateWithString:@"2001-03-24 10:45:32 +0600"];
|
||||
|
||||
if (x) [date retain];
|
||||
|
||||
return date; // expected-warning{{leak}}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue