Skip to content

Commit bc8e601

Browse files
committed
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
1 parent 68ee5ec commit bc8e601

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,9 @@ typedef u64 tid_t;
259259
# define NOEXCEPT throw()
260260
#endif
261261

262-
#if __has_cpp_attribute(clang::fallthrough)
262+
#if __has_cpp_attribute(fallthrough)
263+
# define FALLTHROUGH [[fallthrough]]
264+
#elif __has_cpp_attribute(clang::fallthrough)
263265
# define FALLTHROUGH [[clang::fallthrough]]
264266
#else
265267
# define FALLTHROUGH

0 commit comments

Comments
 (0)