[PATCH] D53950: Enable -Wimplicit-fallthrough for clang as well as GCC

Justin Bogner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 31 15:24:31 PDT 2018


bogner added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/google/AvoidCStyleCastsCheck.cpp:190
     }
-  // FALLTHROUGH
+    LLVM_FALLTHROUGH;  // FALLTHROUGH
   case clang::CK_IntegralCast:
----------------
Having both LLVM_FALLTHROUGH and the comment is redundant.


================
Comment at: clang/lib/AST/ExprConstant.cpp:11146
     }
-
-    // OffsetOf falls through here.
-    LLVM_FALLTHROUGH;
+    llvm_unreachable("invalid unary operator class");
   }
----------------
Could you commit this case (and the one below) separately? While most of the changes in this patch are mechanical, this one is arguably a correctness fix.


https://reviews.llvm.org/D53950





More information about the llvm-commits mailing list