From 70def4341a9f34248b8c0d3edb38ad5464953b9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Sun, 26 Jul 2020 20:19:27 +0200 Subject: [PATCH] Avoid inifinite recursion call in tst_Compiler::cxx11_noexcept warning: all paths through this function will call itself [-Winfinite-recursion] Change-Id: I70008710a7448ffd532bb6c3acb488fe439cb807 Reviewed-by: Thiago Macieira --- tests/auto/other/compiler/tst_compiler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/auto/other/compiler/tst_compiler.cpp b/tests/auto/other/compiler/tst_compiler.cpp index 438058aa452..92429536f1b 100644 --- a/tests/auto/other/compiler/tst_compiler.cpp +++ b/tests/auto/other/compiler/tst_compiler.cpp @@ -981,9 +981,10 @@ void tst_Compiler::cxx11_noexcept() #ifndef Q_COMPILER_NOEXCEPT QSKIP("Compiler does not support C++11 feature"); #else + extern void may_throw(); extern void noexcept_f() noexcept; extern void g() noexcept(noexcept(noexcept_f())); - QCOMPARE(noexcept(cxx11_noexcept()), false); + QCOMPARE(noexcept(may_throw()), false); QCOMPARE(noexcept(noexcept_f), true); QCOMPARE(noexcept(g), true); #endif