aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/stubs/port.h
diff options
context:
space:
mode:
authorJisi Liu <jisi.liu@gmail.com>2015-08-21 11:42:27 -0700
committerJisi Liu <jisi.liu@gmail.com>2015-08-21 11:44:49 -0700
commitc3bc155aceda36ecb01cde2367a3b427f2d7ce40 (patch)
tree195d74745dad40a57d49bf718f50c7751336a405 /src/google/protobuf/stubs/port.h
parentb0f661181d10bddc08e380992590a1cdd92be92b (diff)
parenteb65c69e14fb711208ad5111cb9672f00864bb6d (diff)
downloadprotobuf-c3bc155aceda36ecb01cde2367a3b427f2d7ce40.tar.gz
protobuf-c3bc155aceda36ecb01cde2367a3b427f2d7ce40.tar.bz2
protobuf-c3bc155aceda36ecb01cde2367a3b427f2d7ce40.zip
Merge branch 'master' of github.com:google/protobuf
Change-Id: If3fb07754a734bae610d95124528e073515ac525
Diffstat (limited to 'src/google/protobuf/stubs/port.h')
-rw-r--r--src/google/protobuf/stubs/port.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/google/protobuf/stubs/port.h b/src/google/protobuf/stubs/port.h
index 7d84b92f..5ba04c72 100644
--- a/src/google/protobuf/stubs/port.h
+++ b/src/google/protobuf/stubs/port.h
@@ -196,8 +196,19 @@ static const uint64 kuint64max = GOOGLE_ULONGLONG(0xFFFFFFFFFFFFFFFF);
#define GOOGLE_SAFE_CONCURRENT_WRITES_END()
#endif
+#if defined(__clang__) && defined(__has_cpp_attribute) \
+ && !defined(GOOGLE_PROTOBUF_OS_APPLE)
+# if defined(GOOGLE_PROTOBUF_OS_NACL) || defined(EMSCRIPTEN) || \
+ __has_cpp_attribute(clang::fallthrough)
+# define GOOGLE_FALLTHROUGH_INTENDED [[clang::fallthrough]]
+# endif
+#endif
+
+#ifndef GOOGLE_FALLTHROUGH_INTENDED
+# define GOOGLE_FALLTHROUGH_INTENDED
+#endif
+
#define GOOGLE_GUARDED_BY(x)
-#define GOOGLE_FALLTHROUGH_INTENDED
#define GOOGLE_ATTRIBUTE_COLD
// x86 and x86-64 can perform unaligned loads/stores directly.