Add default -Wimplicit-fallthrough.
After we fix all existing such warnings, it can be changed to an error.
Bug: 112564944
Test: make checkbuild
Change-Id: I61ee3a24a3f992ef018cfe6c995e957416551183
diff --git a/cc/config/clang.go b/cc/config/clang.go
index 5e22d6a..5cf2421 100644
--- a/cc/config/clang.go
+++ b/cc/config/clang.go
@@ -103,6 +103,10 @@
pctx.StaticVariable("ClangExtraCflags", strings.Join([]string{
"-D__compiler_offsetof=__builtin_offsetof",
+ // Make implicit fallthrough an error in the future.
+ "-Wimplicit-fallthrough",
+ "-Wno-error=implicit-fallthrough",
+
// Help catch common 32/64-bit errors.
"-Werror=int-conversion",