Attempt to fix mac build
The upgrade to protobuf 3.5.2 broke mac builds with
-Wimplicit-fallthrough errors. This is caused by port.h not
when GOOGLE_PROTOBUF_OS_APPLE is defined, but that code wasn't
changed by the upgrade. I think this previously worked before
the upgrade because platform_macros.h was never included, so
GOOGLE_PROTOBUF_OS_APPLE was never defined. After the upgrade
port.h includes platform_macros.h, and the check took effect.
We use the same clang for mac and linux builds, so just remove
the extra mac check.
Bug: 117607748
Test: m checkbuild
Change-Id: I890f5a14178b916f3a04dad08aa4fd91bc23889d
diff --git a/src/google/protobuf/stubs/port.h b/src/google/protobuf/stubs/port.h
index 7422aa4..41bd2aa 100644
--- a/src/google/protobuf/stubs/port.h
+++ b/src/google/protobuf/stubs/port.h
@@ -237,8 +237,7 @@
#define GOOGLE_SAFE_CONCURRENT_WRITES_END()
#endif
-#if defined(__clang__) && defined(__has_cpp_attribute) \
- && !defined(GOOGLE_PROTOBUF_OS_APPLE)
+#if defined(__clang__) && defined(__has_cpp_attribute)
# if defined(GOOGLE_PROTOBUF_OS_NACL) || defined(EMSCRIPTEN) || \
__has_cpp_attribute(clang::fallthrough)
# define GOOGLE_FALLTHROUGH_INTENDED [[clang::fallthrough]]