mirror of
https://github.com/fmtlib/fmt.git
synced 2024-11-08 11:33:46 +00:00
Detect [[clang::fallthrough]] even __has_cpp_attribute is not supported
This commit is contained in:
parent
326ade7698
commit
26c151c5e4
4
format.h
4
format.h
@ -61,6 +61,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __clang__
|
#ifdef __clang__
|
||||||
|
# define FMT_CLANG_VERSION (__clang_major__ * 100 + __clang_minor__)
|
||||||
# pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
|
# pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -119,7 +120,8 @@
|
|||||||
# define FMT_NOEXCEPT(expr)
|
# define FMT_NOEXCEPT(expr)
|
||||||
#endif
|
#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]]
|
# define FMT_FALLTHROUGH [[clang::fallthrough]]
|
||||||
#else
|
#else
|
||||||
# define FMT_FALLTHROUGH
|
# define FMT_FALLTHROUGH
|
||||||
|
Loading…
Reference in New Issue
Block a user