make FALLTHROUGH work with qtcreator's code model

the code model inspector claims that __GNUC__ is 10, but the #if works
only with >= 4, which is plain wrong. so just handle clang explicitly.
This commit is contained in:
Oswald Buddenhagen 2020-12-14 23:24:05 +01:00
parent 5b4766fbe4
commit ba7b634186

View File

@ -76,7 +76,7 @@ typedef unsigned long ulong;
# define DIAG_DISABLE(text) # define DIAG_DISABLE(text)
#endif #endif
#if __GNUC__ >= 7 #if __GNUC__ >= 7 || defined(__clang__)
# define FALLTHROUGH __attribute__((fallthrough)); # define FALLTHROUGH __attribute__((fallthrough));
#else #else
# define FALLTHROUGH # define FALLTHROUGH