[PATCH] -Wimplicit-fallthrough: fixed two cases where "fallthrough annotation in unreachable code" was issued incorrectly.

Richard Smith richard at metafoo.co.uk
Wed Feb 6 18:09:31 PST 2013


  Makes sense, LGTM


================
Comment at: test/SemaCXX/switch-implicit-fallthrough.cpp:198-201
@@ -199,6 +197,6 @@
   switch (sizeof(p)) {
     case 9:                    // this test will not work on compilers with 72-bit long
       n += static_cast<int>(p >> 32);
       [[clang::fallthrough]];  // no warning here
     case 5:                    // it is not intended to work on compilers with 40-bit long as well
       n += static_cast<int>(p);
----------------
We can drop these comments now.


http://llvm-reviews.chandlerc.com/D374

BRANCH
  svn

ARCANIST PROJECT
  clang



More information about the cfe-commits mailing list