summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qcompilerdetection.h
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-04-06 13:52:45 +0200
committerLiang Qi <liang.qi@qt.io>2017-04-06 14:16:31 +0200
commit0fc569184cf0fb6663e955e68bfa14baf3f3fe0d (patch)
tree0161df2f2ac28b554e77d62498647054198d8e1e /src/corelib/global/qcompilerdetection.h
parent280e321e52fd4e86545f3f0d4bd4e047786a897e (diff)
parentefb84b6189f9e98c6dd29c22f00ad760445196c2 (diff)
Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts: src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp src/platformsupport/fontdatabases/freetype/qfreetypefontdatabase.cpp src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp src/widgets/widgets/qtabbar.cpp Change-Id: Iaa9daee5f7a6490d56257a3824730a35751ceb05
Diffstat (limited to 'src/corelib/global/qcompilerdetection.h')
-rw-r--r--src/corelib/global/qcompilerdetection.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h
index 8a8d781cf8..fcfe020509 100644
--- a/src/corelib/global/qcompilerdetection.h
+++ b/src/corelib/global/qcompilerdetection.h
@@ -1329,15 +1329,14 @@
Q_ASSUME_IMPL(valueOfExpression);\
} while (0)
+#if defined(__cplusplus)
#if QT_HAS_CPP_ATTRIBUTE(fallthrough)
# define Q_FALLTHROUGH() [[fallthrough]]
-#elif defined(__cplusplus)
-/* Clang can not parse namespaced attributes in C mode, but defines __has_cpp_attribute */
-# if QT_HAS_CPP_ATTRIBUTE(clang::fallthrough)
+#elif QT_HAS_CPP_ATTRIBUTE(clang::fallthrough)
# define Q_FALLTHROUGH() [[clang::fallthrough]]
-# elif QT_HAS_CPP_ATTRIBUTE(gnu::fallthrough)
+#elif QT_HAS_CPP_ATTRIBUTE(gnu::fallthrough)
# define Q_FALLTHROUGH() [[gnu::fallthrough]]
-# endif
+#endif
#endif
#ifndef Q_FALLTHROUGH
# if defined(Q_CC_GNU) && Q_CC_GNU >= 700