sanitizer: support GCC's fallthrough attribute

Fixes:
sanitizer_stack_store.cpp:257:13: warning: this statement may fall through [-Wimplicit-fallthrough=]

when being built with GCC.

Differential Revision: https://reviews.llvm.org/D124832
This commit is contained in:
Martin Liska 2022-05-03 10:54:06 +02:00
parent 68ee5ec07d
commit bc8e601257

View File

@ -259,7 +259,9 @@ typedef u64 tid_t;
# define NOEXCEPT throw()
#endif
#if __has_cpp_attribute(clang::fallthrough)
#if __has_cpp_attribute(fallthrough)
# define FALLTHROUGH [[fallthrough]]
#elif __has_cpp_attribute(clang::fallthrough)
# define FALLTHROUGH [[clang::fallthrough]]
#else
# define FALLTHROUGH