Change fallthrough detection order to fix clang detection
Clang compiler defines fallthrough, but wrongly detects QT_HAS_CPP_ATTRIBUTE(fallthrough). This makes compiler breaks compilation due clang be expecting clang::fallthrough. Change the order makes the exceptions. clang/gnu, been tested before the generic, setting then proper defines at end. LLVM-bug: https://bugs.llvm.org/show_bug.cgi?id=33518 Change-Id: Ic287e9028936af3bdade5c1ee319ca8914b36ea7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
3f519ffa15
commit
159b3306d6
@ -1347,12 +1347,12 @@
|
||||
} while (false)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
#if QT_HAS_CPP_ATTRIBUTE(fallthrough)
|
||||
# define Q_FALLTHROUGH() [[fallthrough]]
|
||||
#elif QT_HAS_CPP_ATTRIBUTE(clang::fallthrough)
|
||||
#if QT_HAS_CPP_ATTRIBUTE(clang::fallthrough)
|
||||
# define Q_FALLTHROUGH() [[clang::fallthrough]]
|
||||
#elif QT_HAS_CPP_ATTRIBUTE(gnu::fallthrough)
|
||||
# define Q_FALLTHROUGH() [[gnu::fallthrough]]
|
||||
#elif QT_HAS_CPP_ATTRIBUTE(fallthrough)
|
||||
# define Q_FALLTHROUGH() [[fallthrough]]
|
||||
#endif
|
||||
#endif
|
||||
#ifndef Q_FALLTHROUGH
|
||||
|
Loading…
Reference in New Issue
Block a user