region-store.c revision a8f2362307b436023095e66efd678ae591c02184
1// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix -verify %s 2 3int printf(const char *restrict,...); 4 5// Testing core functionality of the region store. 6// radar://10127782 7int compoundLiteralTest() { 8 int index = 0; 9 for (index = 0; index < 2; index++) { 10 int thing = (int []){0, 1}[index]; 11 printf("thing: %i\n", thing); 12 } 13 return 0; 14} 15 16int compoundLiteralTest2() { 17 int index = 0; 18 for (index = 0; index < 3; index++) { 19 int thing = (int [][3]){{0,0,0}, {1,1,1}, {2,2,2}}[index][index]; 20 printf("thing: %i\n", thing); 21 } 22 return 0; 23} 24