r178554 - Moved fallthrough regression test to switch-implicit-fallthrough.cpp.

Alexander Kornienko alexfh at google.com
Tue Apr 2 10:55:01 PDT 2013


Author: alexfh
Date: Tue Apr  2 12:55:01 2013
New Revision: 178554

URL: http://llvm.org/viewvc/llvm-project?rev=178554&view=rev
Log:
Moved fallthrough regression test to switch-implicit-fallthrough.cpp.

Removed:
    cfe/trunk/test/SemaCXX/switch-implicit-fallthrough-regression.cpp
Modified:
    cfe/trunk/test/SemaCXX/switch-implicit-fallthrough.cpp

Removed: cfe/trunk/test/SemaCXX/switch-implicit-fallthrough-regression.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/switch-implicit-fallthrough-regression.cpp?rev=178553&view=auto
==============================================================================
--- cfe/trunk/test/SemaCXX/switch-implicit-fallthrough-regression.cpp (original)
+++ cfe/trunk/test/SemaCXX/switch-implicit-fallthrough-regression.cpp (removed)
@@ -1,17 +0,0 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -Wimplicit-fallthrough %s
-
-void f() {
-  class C {
-    void f(int x) {
-      switch (x) {
-        case 0:
-          x++;
-          [[clang::fallthrough]]; // expected-no-diagnostics
-        case 1:
-          x++;
-          break;
-      }
-    }
-  };
-}
-

Modified: cfe/trunk/test/SemaCXX/switch-implicit-fallthrough.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/switch-implicit-fallthrough.cpp?rev=178554&r1=178553&r2=178554&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/switch-implicit-fallthrough.cpp (original)
+++ cfe/trunk/test/SemaCXX/switch-implicit-fallthrough.cpp Tue Apr  2 12:55:01 2013
@@ -247,3 +247,21 @@ int fallthrough_targets(int n) {
   }
   return n;
 }
+
+// Fallthrough annotations in local classes used to generate "fallthrough
+// annotation does not directly precede switch label" warning.
+void fallthrough_in_local_class() {
+  class C {
+    void f(int x) {
+      switch (x) {
+        case 0:
+          x++;
+          [[clang::fallthrough]]; // no diagnostics
+        case 1:
+          x++;
+          break;
+      }
+    }
+  };
+}
+





More information about the cfe-commits mailing list