From 77adddae373cb9e5019a1d789014925330fb8d75 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 15 Oct 2013 12:40:35 -0700 Subject: [PATCH] Move the Apple Clang specific features outside of the C++11 section MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Those are not related to C++11, so move them to the Clang detection block. Change-Id: I80b298e1df5f74a865d743625895e0f01cb5fd6b Reviewed-by: Gabriel de Dietrich Reviewed-by: Morten Johan Sørvig --- src/corelib/global/qcompilerdetection.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index 280c5066a6..d02e4cf199 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -161,6 +161,13 @@ # /* Compatibility with older Clang versions */ # define __has_extension __has_feature # endif +# if defined(__APPLE__) + /* Apple/clang specific features */ +# define Q_DECL_CF_RETURNS_RETAINED __attribute__((cf_returns_retained)) +# ifdef __OBJC__ +# define Q_DECL_NS_RETURNS_AUTORELEASED __attribute__((ns_returns_autoreleased)) +# endif +# endif # else /* Plain GCC */ # if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 @@ -620,14 +627,6 @@ # endif #endif // Q_CC_CLANG -#if defined(Q_CC_CLANG) && defined(__APPLE__) -/* Apple/clang specific features */ -# define Q_DECL_CF_RETURNS_RETAINED __attribute__((cf_returns_retained)) -# ifdef __OBJC__ -# define Q_DECL_NS_RETURNS_AUTORELEASED __attribute__((ns_returns_autoreleased)) -# endif -#endif - #if defined(Q_CC_GNU) && !defined(Q_CC_INTEL) && !defined(Q_CC_CLANG) # if defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L # if (__GNUC__ * 100 + __GNUC_MINOR__) >= 403