Go to the documentation of this file. 25 #ifndef COMMON_FALLTHROUGH_H 26 #define COMMON_FALLTHROUGH_H 44 #ifndef __has_cpp_attribute 45 #define __has_cpp_attribute(x) 0 48 #if __has_cpp_attribute(clang::fallthrough) 49 #define XOREOS_FALLTHROUGH [[clang::fallthrough]] 50 #elif __has_cpp_attribute(gnu::fallthrough) 51 #define XOREOS_FALLTHROUGH [[gnu::fallthrough]] 52 #elif defined(_MSC_VER) 58 #define XOREOS_FALLTHROUGH __fallthrough 60 #define XOREOS_FALLTHROUGH // Fallthrough 63 #if defined(__clang__) 75 #define START_IGNORE_IMPLICIT_FALLTHROUGH _Pragma("clang diagnostic push") \ 76 _Pragma("clang diagnostic ignored \"-Wimplicit-fallthrough\"") 77 #define STOP_IGNORE_IMPLICIT_FALLTHROUGH _Pragma("clang diagnostic pop") 79 #define START_IGNORE_IMPLICIT_FALLTHROUGH 80 #define STOP_IGNORE_IMPLICIT_FALLTHROUGH 83 #endif // COMMON_FALLTHROUGH_H