summaryrefslogtreecommitdiff
path: root/mfbt/Attributes.h
diff options
context:
space:
mode:
Diffstat (limited to 'mfbt/Attributes.h')
-rw-r--r--mfbt/Attributes.h44
1 files changed, 0 insertions, 44 deletions
diff --git a/mfbt/Attributes.h b/mfbt/Attributes.h
index fdd253d357..5da4ffe948 100644
--- a/mfbt/Attributes.h
+++ b/mfbt/Attributes.h
@@ -238,50 +238,6 @@
#ifdef __cplusplus
-/**
- * MOZ_FALLTHROUGH is an annotation to suppress compiler warnings about switch
- * cases that fall through without a break or return statement. MOZ_FALLTHROUGH
- * is only needed on cases that have code.
- *
- * MOZ_FALLTHROUGH_ASSERT is an annotation to suppress compiler warnings about
- * switch cases that MOZ_ASSERT(false) (or its alias MOZ_ASSERT_UNREACHABLE) in
- * debug builds, but intentionally fall through in release builds. See comment
- * in Assertions.h for more details.
- *
- * switch (foo) {
- * case 1: // These cases have no code. No fallthrough annotations are needed.
- * case 2:
- * case 3: // This case has code, so a fallthrough annotation is needed!
- * foo++;
- * MOZ_FALLTHROUGH;
- * case 4:
- * return foo;
- *
- * default:
- * // This case asserts in debug builds, falls through in release.
- * MOZ_FALLTHROUGH_ASSERT("Unexpected foo value?!");
- * case 5:
- * return 5;
- * }
- */
-#ifndef __has_cpp_attribute
-# define __has_cpp_attribute(x) 0
-#endif
-
-#if __has_cpp_attribute(clang::fallthrough)
-# define MOZ_FALLTHROUGH [[clang::fallthrough]]
-#elif __has_cpp_attribute(gnu::fallthrough)
-# define MOZ_FALLTHROUGH [[gnu::fallthrough]]
-#elif defined(_MSC_VER)
- /*
- * MSVC's __fallthrough annotations are checked by /analyze (Code Analysis):
- * https://msdn.microsoft.com/en-us/library/ms235402%28VS.80%29.aspx
- */
-# include <sal.h>
-# define MOZ_FALLTHROUGH __fallthrough
-#else
-# define MOZ_FALLTHROUGH /* FALLTHROUGH */
-#endif
/*
* MOZ_ASAN_BLACKLIST is a macro to tell AddressSanitizer (a compile-time
* instrumentation shipped with Clang and GCC) to not instrument the annotated