Unbreak developer build with clang-cl
Move the macro definitions for Q_DECL_UNUSED_MEMBER along with
a definition for Q_DECL_UNUSED from the scope excluding icc
and cl into a separate one for plain clang and cl since the
attributes work with clang-cl as well.
Remove the check introduced in
9782938045
since it is assumed that all clang versions have the attribute now.
Fixes:
include\QtCore/../../src/corelib/io/qloggingcategory.h(87,32): error: private field 'd' is not used [-Werror,-Wunused-private-field]
Q_DECL_UNUSED_MEMBER void *d; // reserved for future use
^
include\QtCore/../../src/corelib/io/qloggingcategory.h(108,31): error: private field 'placeholder' is not used [-Werror,-Wunused-private-field]
Q_DECL_UNUSED_MEMBER bool placeholder[4]; // reserved for future use
Task-number: QTBUG-63512
Change-Id: I651771b085408443bb02e96698a980170fcaeb6d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
3ea2c18faa
commit
c24404dbda
@ -828,13 +828,14 @@
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# if defined(__has_warning)
|
||||
# if __has_warning("-Wunused-private-field")
|
||||
# define Q_DECL_UNUSED_MEMBER Q_DECL_UNUSED
|
||||
# endif
|
||||
# endif
|
||||
#endif // Q_CC_CLANG && !Q_CC_INTEL && !Q_CC_MSVC
|
||||
|
||||
#endif // Q_CC_CLANG
|
||||
#if defined(Q_CC_CLANG) && !defined(Q_CC_INTEL)
|
||||
# ifndef Q_DECL_UNUSED
|
||||
# define Q_DECL_UNUSED __attribute__((__unused__))
|
||||
# endif
|
||||
# define Q_DECL_UNUSED_MEMBER Q_DECL_UNUSED
|
||||
#endif
|
||||
|
||||
#if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && !defined(Q_CC_CLANG)
|
||||
# define Q_COMPILER_RESTRICTED_VLA
|
||||
|
Loading…
Reference in New Issue
Block a user