uninit-vals.m revision d427023c334fe03105d9359711a3df4d6f23b344
1// RUN: clang -analyze -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} 25