[cfe-commits] r163620 - /cfe/trunk/test/SemaCXX/scope-check.cpp

Rafael Espindola rafael.espindola at gmail.com
Tue Sep 11 07:17:47 PDT 2012


Author: rafael
Date: Tue Sep 11 09:17:47 2012
New Revision: 163620

URL: http://llvm.org/viewvc/llvm-project?rev=163620&view=rev
Log:
Fix namespace nesting and remove windows line endings.

Modified:
    cfe/trunk/test/SemaCXX/scope-check.cpp

Modified: cfe/trunk/test/SemaCXX/scope-check.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/scope-check.cpp?rev=163620&r1=163619&r2=163620&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/scope-check.cpp (original)
+++ cfe/trunk/test/SemaCXX/scope-check.cpp Tue Sep 11 09:17:47 2012
@@ -174,14 +174,14 @@
 
 // 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 @@
       }
 
       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;
+  }
 }
-





More information about the cfe-commits mailing list