QGlobalStatic: fix Clang warning about expression in unevaluated context
From Clang 13: qlocale.cpp:854:161: error: expression with side effects has no effect in an unevaluated context [-Werror,-Wunevaluated-expression] Pick-to: 6.3 Change-Id: Ibf4acec0f166495998f7fffd16d6c75ef1e04262 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
parent
e3cc3900cd
commit
77e4177d16
@ -134,6 +134,8 @@ protected:
|
||||
};
|
||||
|
||||
#define Q_GLOBAL_STATIC_WITH_ARGS(TYPE, NAME, ARGS) \
|
||||
QT_WARNING_PUSH \
|
||||
QT_WARNING_DISABLE_CLANG("-Wunevaluated-expression") \
|
||||
namespace { struct Q_QGS_ ## NAME { \
|
||||
typedef TYPE QGS_Type; \
|
||||
static void innerFunction(void *pointer) \
|
||||
@ -143,6 +145,7 @@ protected:
|
||||
} \
|
||||
}; } \
|
||||
static QGlobalStatic<QtGlobalStatic::Holder<Q_QGS_ ## NAME>> NAME; \
|
||||
QT_WARNING_POP
|
||||
/**/
|
||||
|
||||
#define Q_GLOBAL_STATIC(TYPE, NAME, ...) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user