projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68ee5ec
)
sanitizer: support GCC's fallthrough attribute
author
Martin Liska
<mliska@suse.cz>
Tue, 3 May 2022 08:54:06 +0000
(10:54 +0200)
committer
Martin Liska
<mliska@suse.cz>
Tue, 3 May 2022 09:30:13 +0000
(11:30 +0200)
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
compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
patch
|
blob
|
history
diff --git
a/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
b/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
index
924578b
..
95a80b4
100644
(file)
--- a/
compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
+++ b/
compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
@@
-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