blob: f7a7df766e5005b4665f452b87b2c98b4e4ac892 [file] [log] [blame]
Daniel Dunbard4270232009-01-20 23:17:32 +00001// RUN: clang -analyze -checker-cfref -verify %s
Ted Kremenekfb8a7fd2008-09-19 20:53:52 +00002
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}