1 // RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store=region -verify %s 2 3 typedef unsigned int NSUInteger; 4 5 @interface A 6 - (NSUInteger)foo; 7 @end 8 9 NSUInteger 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 26 27 // PR10163 -- don't warn for default-initialized float arrays. 28 // (An additional test is in uninit-vals-ps-region.m) 29 void test_PR10163(float); 30 void PR10163 (void) { 31 float x[2] = {0}; 32 test_PR10163(x[1]); // no-warning 33 } 34