Fix namespace nesting and remove windows line endings.

llvm-svn: 163620
This commit is contained in:
Rafael Espindola 2012-09-11 14:17:47 +00:00
parent 6a2da6b9c8
commit ef1707c013
1 changed files with 15 additions and 20 deletions

View File

@ -174,14 +174,14 @@ namespace test9 {
// http://llvm.org/PR10462 // http://llvm.org/PR10462
namespace PR10462 { namespace PR10462 {
enum MyEnum { enum MyEnum {
something_valid, something_valid,
something_invalid something_invalid
}; };
bool recurse() { bool recurse() {
MyEnum K; MyEnum K;
switch (K) { // expected-warning {{enumeration value 'something_invalid' not handled in switch}} switch (K) { // expected-warning {{enumeration value 'something_invalid' not handled in switch}}
case something_valid: case something_valid:
case what_am_i_thinking: // expected-error {{use of undeclared identifier}} case what_am_i_thinking: // expected-error {{use of undeclared identifier}}
int *X = 0; int *X = 0;
@ -189,21 +189,16 @@ bool recurse() {
} }
break; break;
}
} }
} }
namespace test10 { namespace test10 {
int test() {
int test() { static void *ps[] = { &&a0 };
static void *ps[] = { &&a0 }; goto *&&a0; // expected-error {{goto into protected scope}}
goto *&&a0; // expected-error {{goto into protected scope}} int a = 3; // expected-note {{jump bypasses variable initialization}}
int a = 3; // expected-note {{jump bypasses variable initialization}} a0:
a0: return 0;
return 0; }
} }
}
}