diff options
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qatomicscopedvaluerollback_p.h | 1 | ||||
-rw-r--r-- | src/corelib/tools/qfreelist_p.h | 3 | ||||
-rw-r--r-- | src/corelib/tools/qhash.cpp | 1 |
3 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/tools/qatomicscopedvaluerollback_p.h b/src/corelib/tools/qatomicscopedvaluerollback_p.h index a0f088ec45..147156d585 100644 --- a/src/corelib/tools/qatomicscopedvaluerollback_p.h +++ b/src/corelib/tools/qatomicscopedvaluerollback_p.h @@ -43,6 +43,7 @@ class [[nodiscard]] QAtomicScopedValueRollback } // GCC 8.x does not tread __builtin_unreachable() as constexpr #if !defined(Q_CC_GNU_ONLY) || (Q_CC_GNU >= 900) + // NOLINTNEXTLINE(qt-use-unreachable-return): Triggers on Clang, breaking GCC 8 Q_UNREACHABLE(); #endif return std::memory_order_seq_cst; diff --git a/src/corelib/tools/qfreelist_p.h b/src/corelib/tools/qfreelist_p.h index c06c569d23..6bbde5b4b6 100644 --- a/src/corelib/tools/qfreelist_p.h +++ b/src/corelib/tools/qfreelist_p.h @@ -124,8 +124,7 @@ class QFreeList return i; x -= size; } - Q_UNREACHABLE(); - return -1; + Q_UNREACHABLE_RETURN(-1); } // allocate a block of the given \a size, initialized starting with the given \a offset diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp index 9b69c79389..bac2a01afc 100644 --- a/src/corelib/tools/qhash.cpp +++ b/src/corelib/tools/qhash.cpp @@ -107,6 +107,7 @@ private: StateResult result = { 0, OverriddenByEnvironment }; #ifdef QT_BOOTSTRAPPED Q_UNUSED(which); + // NOLINTNEXTLINE(qt-use-unreachable-return): triggers on QT_BOOTSTRAPPED, breaking #else case Q_UNREACHABLE(); #else // can't use qEnvironmentVariableIntValue (reentrancy) |