aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-09-11 14:17:47 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-09-11 14:17:47 +0000
commit4e0d3cb72f37f46e62df9bbf5a5f3eb910de3f5b (patch)
treee345cc53171736c953fedfb92d2ee771a8e8b2ef
parenta74e4afa5764ffa8c335dea3d0047a00a17e7a24 (diff)
Fix namespace nesting and remove windows line endings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163620 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/SemaCXX/scope-check.cpp37
1 files changed, 16 insertions, 21 deletions
diff --git a/test/SemaCXX/scope-check.cpp b/test/SemaCXX/scope-check.cpp
index b659de001c..86d1bd8960 100644
--- a/test/SemaCXX/scope-check.cpp
+++ b/test/SemaCXX/scope-check.cpp
@@ -174,14 +174,14 @@ namespace test9 {
// http://llvm.org/PR10462
namespace PR10462 {
-enum MyEnum {
- something_valid,
- something_invalid
-};
-
-bool recurse() {
- MyEnum K;
- switch (K) { // expected-warning {{enumeration value 'something_invalid' not handled in switch}}
+ enum MyEnum {
+ something_valid,
+ something_invalid
+ };
+
+ bool recurse() {
+ MyEnum K;
+ switch (K) { // expected-warning {{enumeration value 'something_invalid' not handled in switch}}
case something_valid:
case what_am_i_thinking: // expected-error {{use of undeclared identifier}}
int *X = 0;
@@ -189,21 +189,16 @@ bool recurse() {
}
break;
+ }
}
}
-
namespace test10 {
-
-int test() {
- static void *ps[] = { &&a0 };
- goto *&&a0; // expected-error {{goto into protected scope}}
- int a = 3; // expected-note {{jump bypasses variable initialization}}
- a0:
- return 0;
-}
-
-}
-
+ int test() {
+ static void *ps[] = { &&a0 };
+ goto *&&a0; // expected-error {{goto into protected scope}}
+ int a = 3; // expected-note {{jump bypasses variable initialization}}
+ a0:
+ return 0;
+ }
}
-