-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(util): remove platform-specific M_FALLTHROUGH_INTENDED defines
- Loading branch information
Showing
1 changed file
with
1 addition
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,19 +22,4 @@ | |
#error We do not support your compiler. Please email [email protected] and tell us about your use case. | ||
#endif | ||
|
||
#if defined(__clang__) && defined(__has_warning) | ||
#if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough") | ||
#define M_FALLTHROUGH_INTENDED [[clang::fallthrough]] | ||
#endif | ||
#elif defined(__GNUC__) && __GNUC__ >= 7 | ||
// Taken from https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wimplicit-fallthrough_003d | ||
// We could also use a comment, but that would require ccache users to set the | ||
// keep_comments_cpp option. If we switch to C++17, we can use [[fallthough]]. | ||
#define M_FALLTHROUGH_INTENDED __attribute__ ((fallthrough)); | ||
#endif | ||
|
||
#ifndef M_FALLTHROUGH_INTENDED | ||
#define M_FALLTHROUGH_INTENDED \ | ||
do { \ | ||
} while (0) | ||
#endif | ||
#define M_FALLTHROUGH_INTENDED [[fallthrough]] |