2009-11-08 04:45:36 +03:00
|
|
|
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s
|
2009-03-24 05:24:46 +03:00
|
|
|
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
|
2008-09-20 00:53:52 +04:00
|
|
|
|
|
|
|
typedef unsigned int NSUInteger;
|
|
|
|
|
|
|
|
@interface A
|
|
|
|
- (NSUInteger)foo;
|
|
|
|
@end
|
|
|
|
|
|
|
|
NSUInteger f8(A* x){
|
|
|
|
const NSUInteger n = [x foo];
|
|
|
|
int* bogus;
|
|
|
|
|
|
|
|
if (n > 0) { // tests const cast transfer function logic
|
|
|
|
NSUInteger i;
|
|
|
|
|
|
|
|
for (i = 0; i < n; ++i)
|
|
|
|
bogus = 0;
|
|
|
|
|
|
|
|
if (bogus) // no-warning
|
|
|
|
return n+1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return n;
|
|
|
|
}
|