Add -Werror=missing-noreturn (GCC, clang)

May be useful to diagnose functions which fail assertions unconditionally.
This commit is contained in:
Nekotekina 2021-04-08 00:52:18 +03:00
parent 94c62b1eec
commit 95725bf7fc
20 changed files with 55 additions and 36 deletions

View file

@ -3220,6 +3220,7 @@ void spu_recompiler_base::dump(const spu_program& result, std::string& out)
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#pragma GCC diagnostic ignored "-Weffc++"
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#endif
#include "llvm/ADT/Triple.h"
#include "llvm/IR/LegacyPassManager.h"
@ -5311,7 +5312,7 @@ public:
call(name, &exec_fall<F>, m_thread, m_ir->getInt32(op.opcode));
}
static void exec_unk(spu_thread*, u32 op)
[[noreturn]] static void exec_unk(spu_thread*, u32 op)
{
fmt::throw_exception("Unknown/Illegal instruction (0x%08x)", op);
}