From 8207e48adcb4208f0ba441d16e0ddb13db22173d Mon Sep 17 00:00:00 2001 From: versat Date: Tue, 12 Feb 2019 08:21:49 +0100 Subject: [PATCH] qt.cfg: Add support for macros Q_LIKELY and Q_UNLIKELY Reference: https://doc.qt.io/qt-5/qtglobal.html#Q_LIKELY https://doc.qt.io/qt-5/qtglobal.html#Q_UNLIKELY --- cfg/qt.cfg | 2 ++ test/cfg/qt.cpp | 3 +++ 2 files changed, 5 insertions(+) diff --git a/cfg/qt.cfg b/cfg/qt.cfg index d5e3ebd71..c3380c1f4 100644 --- a/cfg/qt.cfg +++ b/cfg/qt.cfg @@ -1318,11 +1318,13 @@ + + diff --git a/test/cfg/qt.cpp b/test/cfg/qt.cpp index 54be3d2de..03b2b9fb0 100644 --- a/test/cfg/qt.cpp +++ b/test/cfg/qt.cpp @@ -54,6 +54,9 @@ void validCode(int * pIntPtr) Q_FOREVER { } } + + if (Q_LIKELY(pIntPtr)) {} + if (Q_UNLIKELY(!pIntPtr)) {} } void ignoredReturnValue()