Suppress implicit-fallthrough warnings.
Add FALLTHROUGH_INTENDED for clang compiler.
Bug: 112564944
Test: build with global -Wimplicit-fallthrough.
Change-Id: I40f8bbf94e207c9dd90921e9b762ba51abab5777
diff --git a/include/android-base/macros.h b/include/android-base/macros.h
index 49cc0c9..1748665 100644
--- a/include/android-base/macros.h
+++ b/include/android-base/macros.h
@@ -170,7 +170,9 @@
//
// In either case this macro has no effect on runtime behavior and performance
// of code.
+#ifndef FALLTHROUGH_INTENDED
#define FALLTHROUGH_INTENDED [[clang::fallthrough]] // NOLINT
+#endif
// Current ABI string
#if defined(__arm__)