qdoc: Add config variable for clang defines

The qdoc 'defines' config variable lists values
that contain '*' to represent wildcards, but clang
doesn't accept them. This change adds a new config
variable called 'clangdefines' which explicitly
lists all the defines that match the wildcards.

It also lists several Qt defines for C++11 stuff,
because when clangqdoc comes into use, all the
supported compilers for Qt will support C++11
constructs.

There might be a few defines listed in clangdefines
that are unnecessary and maybe a few that we really
should not include, but we can adjust the list as
needed.

The clangqdoc code that reads this new config variable
will be added in a separate change. This change will
not affect the non-clang qdoc, because qdoc will just
ignore the clangdefines variable.

This change also adds Q_CLANG_QDOC to 'defines' and
to 'clangdefine'. Q_CLANG_QDOC is meant to be used
in the sources the way Q_QDOC is used. It indicates
that a particular use of Q_QDOC has been reviewed and
is still required for clangqdoc.

Change-Id: I3b00b18ec726196eda5cfa8411cd3e87433fec59
Reviewed-by: Martin Smith <martin.smith@qt.io>
This commit is contained in:
Martin Smith 2016-08-12 12:30:43 +02:00
parent 29bbbe5e60
commit 4f24e30f57

View File

@ -1,6 +1,7 @@
versionsym = QT_VERSION_STR
defines += Q_QDOC \
Q_CLANG_QDOC \
QT_.*_SUPPORT \
QT_.*_LIB \
QT_COMPAT \
@ -18,6 +19,53 @@ defines += Q_QDOC \
Q_COMPILER_UNIFORM_INIT \
Q_COMPILER_RVALUE_REFS
clangdefines += __cplusplus \
Q_QDOC \
Q_CLANG_QDOC \
QT_COMPAT \
QT3_SUPPORT \
QT_BUILD_CORE_LIB \
QT_BUILD_EGL_DEVICE_LIB \
QT_BUILD_LOCATION_LIB \
QT_BUILD_SCRIPT_LIB \
QT_BUILD_TESTLIB_LIB \
QT_BUILD_WIDGETS_LIB \
QT_CORE_LIB \
QT_DEPRECATED \
QT_GUI_LIB \
QT_KEYPAD_NAVIGATION \
QT_LARGEFILE_SUPPORT \
QT_NETWORK_LIB \
QT_NO_EGL \
QT_OPENGL_SUPPORT \
QT_SCRIPT_LIB \
QT_SHARED_POINTER_BACKTRACE_SUPPORT \
QT_WIDGETS_LIB \
Q_BYTE_ORDER \
Q_CC_CLANG \
Q_COMPILER_CONSTEXPR \
Q_COMPILER_DEFAULT_MEMBERS \
Q_COMPILER_DELETE_MEMBERS \
Q_COMPILER_EXPLICIT_OVERRIDES \
Q_COMPILER_INITIALIZER_LISTS \
Q_COMPILER_MANGLES_RETURN_TYPE \
Q_COMPILER_NOEXCEPT \
Q_COMPILER_NULLPTR \
Q_COMPILER_RVALUE_REFS \
Q_COMPILER_STATIC_ASSERT \
Q_COMPILER_UNIFORM_INIT \
Q_COMPILER_UNICODE_STRINGS \
Q_COMPILER_VARIADIC_MACROS \
Q_COMPILER_VARIADIC_TEMPLATES \
Q_ATOMIC_INT16_IS_SUPPORTED \
Q_ATOMIC_INT64_IS_SUPPORTED \
Q_ATOMIC_INT8_IS_SUPPORTED \
Q_DEAD_CODE_FROM_QT4_MAC \
Q_DEAD_CODE_FROM_QT4_WIN \
Q_DEAD_CODE_FROM_QT4_X11
# Q_COMPILER_REF_QUALIFIERS is not yet supported by all compilers
Cpp.ignoretokens += \
ENGINIOCLIENT_EXPORT \
PHONON_EXPORT \