blob: 74aa6672027047f30fffe276b529b00425b52da3 [file] [log] [blame]
Ted Kremenekfb8a7fd2008-09-19 20:53:52 +00001// RUN: clang -checker-cfref -verify %s
2
3typedef unsigned int NSUInteger;
4
5@interface A
6- (NSUInteger)foo;
7@end
8
9NSUInteger f8(A* x){
10 const NSUInteger n = [x foo];
11 int* bogus;
12
13 if (n > 0) { // tests const cast transfer function logic
14 NSUInteger i;
15
16 for (i = 0; i < n; ++i)
17 bogus = 0;
18
19 if (bogus) // no-warning
20 return n+1;
21 }
22
23 return n;
24}