1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 04:02:42 +01:00

Add error on missing 'override'

For consistency.
This commit is contained in:
Nekotekina 2021-02-15 18:45:54 +03:00
parent 3bcd76bd4e
commit 1446254a03
7 changed files with 21 additions and 3 deletions

View File

@ -177,6 +177,10 @@ inline FT build_function_asm(F&& builder)
#pragma GCC diagnostic ignored "-Wall"
#pragma GCC diagnostic ignored "-Wextra"
#pragma GCC diagnostic ignored "-Wold-style-cast"
#pragma GCC diagnostic ignored "-Wsuggest-override"
#ifdef __clang__
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#endif
#endif
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"

View File

@ -9,7 +9,7 @@ protected:
{
}
virtual u32 DisAsmBranchTarget(const s32 imm)=0;
virtual u32 DisAsmBranchTarget(const s32 imm) override = 0;
void DisAsm_V4(const std::string& op, u32 v0, u32 v1, u32 v2, u32 v3)
{

View File

@ -8,6 +8,10 @@
#pragma GCC diagnostic ignored "-Wall"
#pragma GCC diagnostic ignored "-Wextra"
#pragma GCC diagnostic ignored "-Wold-style-cast"
#pragma GCC diagnostic ignored "-Wsuggest-override"
#ifdef __clang__
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#endif
#endif
#include "SPIRV/GlslangToSpv.h"
#include "spirv-tools/optimizer.hpp"

View File

@ -43,6 +43,10 @@ private:
#pragma GCC diagnostic ignored "-Wextra"
#pragma GCC diagnostic ignored "-Wold-style-cast"
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wsuggest-override"
#ifdef __clang__
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
#endif
#endif
#include "3rdparty/GPUOpen/include/vk_mem_alloc.h"
#ifdef _MSC_VER

View File

@ -33,6 +33,12 @@ else()
add_compile_options(-Werror=return-type)
add_compile_options(-Werror=overloaded-virtual)
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Werror=inconsistent-missing-override)
else()
add_compile_options(-Werror=suggest-override)
endif()
#TODO Clean the code so these are removed
add_compile_options(-Wno-attributes)

View File

@ -14,7 +14,7 @@ public:
custom_table_widget_item(const std::string& text, int sort_role = Qt::DisplayRole, const QVariant& sort_value = 0);
custom_table_widget_item(const QString& text, int sort_role = Qt::DisplayRole, const QVariant& sort_value = 0);
bool operator<(const QTableWidgetItem& other) const;
bool operator<(const QTableWidgetItem& other) const override;
void setData(int role, const QVariant& value, bool assign_sort_role);
};

View File

@ -51,7 +51,7 @@ struct gui_listener : logs::listener
{
}
void log(u64 stamp, const logs::message& msg, const std::string& prefix, const std::string& text)
void log(u64 stamp, const logs::message& msg, const std::string& prefix, const std::string& text) override
{
Q_UNUSED(stamp);