Skip to content

Commit

Permalink
Avoid inifinite recursion call in tst_Compiler::cxx11_noexcept
Browse files Browse the repository at this point in the history
  warning: all paths through this function will call itself [-Winfinite-recursion]

Change-Id: I70008710a7448ffd532bb6c3acb488fe439cb807
Reviewed-by: Thiago Macieira <[email protected]>
  • Loading branch information
torarnv committed Aug 28, 2020
1 parent 6ab6571 commit 70def43
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/auto/other/compiler/tst_compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 70def43

Please sign in to comment.