Commit 26c151c5 authored by viz's avatar viz

Detect [[clang::fallthrough]] even __has_cpp_attribute is not supported

parent 326ade76
......@@ -61,6 +61,7 @@
#endif
#ifdef __clang__
# define FMT_CLANG_VERSION (__clang_major__ * 100 + __clang_minor__)
# pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
#endif
......@@ -119,7 +120,8 @@
# define FMT_NOEXCEPT(expr)
#endif
#if FMT_HAS_CPP_ATTRIBUTE(clang::fallthrough)
#if FMT_HAS_CPP_ATTRIBUTE(clang::fallthrough) || \
(FMT_CLANG_VERSION >= 600 && __cplusplus >= 201103)
# define FMT_FALLTHROUGH [[clang::fallthrough]]
#else
# define FMT_FALLTHROUGH
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment