]> granicus.if.org Git - clang/commitdiff
Fix namespace nesting and remove windows line endings.
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 11 Sep 2012 14:17:47 +0000 (14:17 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 11 Sep 2012 14:17:47 +0000 (14:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163620 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaCXX/scope-check.cpp

index b659de001c0f7c65bf5ebf9f392797d2bf3628a3..86d1bd8960f6e98c8142cf889544992554cf4ec7 100644 (file)
@@ -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 {
-\r
-int test() {\r
-  static void *ps[] = { &&a0 };\r
-  goto *&&a0; // expected-error {{goto into protected scope}}\r
-  int a = 3; // expected-note {{jump bypasses variable initialization}}\r
- a0:\r
-  return 0;\r
-}
-
-}
-
+  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;
+  }
 }
-