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 case 1: 17 v++; 18 id w3 = p; 19 break; 20 case 2: 21 case 3: 22 break; 23 default: 24 break; 25 } 26 } 27 28 void test2(int p) { 29 switch (p) { 30 case 3:; 31 NSObject *o = [[NSObject alloc] init]; 32 [o release]; 33 break; 34 default: 35 break; 36 } 37 } 38