Fix detection for [[fallthrough]] with GCC

llvm-svn: 302285
This commit is contained in:
Eric Fiselier
2017-05-05 20:50:24 +00:00
parent 7dd8073284
commit 1a5733af6a

View File

@@ -1089,7 +1089,7 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
# define _LIBCPP_DIAGNOSE_ERROR(...)
#endif
#if __has_attribute(fallthough) || defined(_LIBCPP_COMPILER_GCC)
#if __has_attribute(fallthough) || _GNUC_VER >= 700
// Use a function like macro to imply that it must be followed by a semicolon
#define _LIBCPP_FALLTHROUGH() __attribute__((__fallthrough__))
#else