From 163dcf2b71f34a12137f200e4af5640e42e5f5e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 4 Mar 2013 14:27:35 +0100 Subject: Fix build with older Clang versions without __has_extension Change-Id: I505d3e4ad2fcd56ee229935d8543811a43923273 Reviewed-by: Thiago Macieira --- src/corelib/global/qcompilerdetection.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/corelib/global') diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index a4af8b8899..383d9c9c6e 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -157,6 +157,10 @@ # define Q_CC_CLANG # define Q_ASSUME_IMPL(expr) if (expr){} else __builtin_unreachable() # define Q_UNREACHABLE_IMPL() __builtin_unreachable() +# if !defined(__has_extension) +# /* Compatibility with older Clang versions */ +# define __has_extension __has_feature +# endif # else /* Plain GCC */ # if (__GNUC__ * 100 + __GNUC_MINOR__) >= 405 -- cgit v1.2.3