summaryrefslogtreecommitdiff
path: root/Source/Checks/cm_cxx_fallthrough.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Checks/cm_cxx_fallthrough.cxx')
-rw-r--r--Source/Checks/cm_cxx_fallthrough.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/Checks/cm_cxx_fallthrough.cxx b/Source/Checks/cm_cxx_fallthrough.cxx
new file mode 100644
index 0000000000..7b35a5f29a
--- /dev/null
+++ b/Source/Checks/cm_cxx_fallthrough.cxx
@@ -0,0 +1,11 @@
+int main(int argc, char* argv[])
+{
+ int i = 3;
+ switch (argc) {
+ case 1:
+ i = 0;
+ [[fallthrough]];
+ default:
+ return i;
+ }
+}