diff --git a/application/global.h b/application/global.h index e8cd448..2a616d3 100644 --- a/application/global.h +++ b/application/global.h @@ -86,4 +86,16 @@ # define IF_DEBUG_BUILD(x) #endif +/*! + * \def FALLTHROUGH + * \brief Prevents clang from warning about missing break in switch-case. + * \remarks Does nothing if another compiler is used. + */ + +#ifdef __clang__ +# define FALLTHROUGH [[clang::fallthrough]] +# else +# define FALLTHROUGH +#endif + #endif // APPLICATION_UTILITIES_GLOBAL_H