* spot/misc/common.hh (SPOT_FALLTHROUGH): Work around Clang 3.5.

This commit is contained in:
Alexandre Duret-Lutz 2016-10-10 14:29:20 +02:00
parent 7ff50d8913
commit ed45be98ea

View file

@ -129,7 +129,13 @@
# endif # endif
#endif #endif
#ifndef SPOT_FALLTHROUGH #ifndef SPOT_FALLTHROUGH
# define SPOT_FALLTHROUGH while (0) // Clang 3.5 does not support __has_cpp_attribute but has
// [[clang::fallthrough]].
# if __clang__
# define SPOT_FALLTHROUGH [[clang::fallthrough]]
# else
# define SPOT_FALLTHROUGH while (0)
# endif
#endif #endif
namespace spot namespace spot