1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -x objective-c %s.result 2 // RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c %s > %t 3 // RUN: diff %t %s.result 4 // DISABLE: mingw32 5 6 #include "Common.h" 7 8 void test(id p, int x) { 9 int v; 10 switch(x) { 11 case 0: { 12 v++; 13 id w1 = p; 14 id w2 = p; 15 break; 16 } 17 case 1: { 18 v++; 19 id w3 = p; 20 break; 21 } 22 case 2: 23 case 3: 24 break; 25 default: 26 break; 27 } 28 } 29 30 void test2(int p) { 31 switch (p) { 32 case 3: {; 33 NSObject *o = [[NSObject alloc] init]; 34 break; 35 } 36 default: 37 break; 38 } 39 } 40