vkjson: Move redefinition of FALLTHROUGH_INTENDED
The macro FALLTHROUGH_INTENDED is defined in both
vulkan/vkjson/vkjson.h and android-base/macros.h, causing build errors
for any other modules that include both header files.
Move the redefinition to vkjson.cc.
Note that <android-base/macros.h> is not available for the libvkjson_ndk
build, so we cannot use that version of the macro and eliminate the
redefinition entirely.
Bug: 372694741
Test: CQ
Flag: EXEMPT bugfix
Change-Id: I02a0f2a50f3807ca932e84a5a002598b04c5f92a
diff --git a/vulkan/vkjson/vkjson.cc b/vulkan/vkjson/vkjson.cc
index 3cb9405..8c0cce2 100644
--- a/vulkan/vkjson/vkjson.cc
+++ b/vulkan/vkjson/vkjson.cc
@@ -38,6 +38,12 @@
namespace {
+/*
+ * Annotation to tell clang that we intend to fall through from one case to
+ * another in a switch. Sourced from android-base/macros.h.
+ */
+#define FALLTHROUGH_INTENDED [[clang::fallthrough]]
+
inline bool IsIntegral(double value) {
#if defined(ANDROID)
// Android NDK doesn't provide std::trunc yet