diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-07-26 20:19:27 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-08-28 09:43:14 +0000 |
commit | 70def4341a9f34248b8c0d3edb38ad5464953b9e (patch) | |
tree | 1561803656b0f07d627c952e0f2442a13f7a5937 /tests/auto/other | |
parent | 6ab6571f24d69f946f5dc1b1e83b86ca76d9944f (diff) |
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 <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/other')
-rw-r--r-- | tests/auto/other/compiler/tst_compiler.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/other/compiler/tst_compiler.cpp b/tests/auto/other/compiler/tst_compiler.cpp index 438058aa45..92429536f1 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 |