uninit-vals.m revision 4fcfde4d5c8f25e40720972a5543d538a0dcb220
1// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s 2// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s 3 4typedef unsigned int NSUInteger; 5 6@interface A 7- (NSUInteger)foo; 8@end 9 10NSUInteger f8(A* x){ 11 const NSUInteger n = [x foo]; 12 int* bogus; 13 14 if (n > 0) { // tests const cast transfer function logic 15 NSUInteger i; 16 17 for (i = 0; i < n; ++i) 18 bogus = 0; 19 20 if (bogus) // no-warning 21 return n+1; 22 } 23 24 return n; 25} 26