2010-05-21 07:20:59 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
|
|
|
|
// <rdar://problem/7971948>
|
|
|
|
struct A {};
|
|
|
|
struct B {
|
2010-12-24 06:56:40 +08:00
|
|
|
void foo(int b) {
|
2010-05-21 07:20:59 +08:00
|
|
|
switch (a) { // expected-error{{use of undeclared identifier 'a'}}
|
|
|
|
default:
|
|
|
|
return;
|
|
|
|
}
|
2010-12-24 06:56:40 +08:00
|
|
|
|
|
|
|
switch (b) {
|
|
|
|
case 17 // expected-error{{expected ':' after 'case'}}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default // expected-error{{expected ':' after 'default'}}
|
|
|
|
return;
|
|
|
|
}
|
2010-05-21 07:20:59 +08:00
|
|
|
}
|
|
|
|
};
|