[warnings] Add Wsuggest-override and Wsuggest-destructor-override.
This CL adds the `-Wsuggest-override` and `-Wsuggest-destructor-override` warnings and fixes up the identified issues. Change-Id: I0ec1303a822abc258ce34d3bf1900e37ade6a8dc Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/89561 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Auto-Submit: Dan Sinclair <dsinclair@chromium.org> Commit-Queue: Dan Sinclair <dsinclair@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
parent
552045a559
commit
a5ff0e9dc3
2
DEPS
2
DEPS
|
@ -96,7 +96,7 @@ deps = {
|
|||
'condition': 'dawn_standalone',
|
||||
},
|
||||
'third_party/googletest': {
|
||||
'url': '{chromium_git}/external/github.com/google/googletest@6b74da4757a549563d7c37c8fae3e704662a043b',
|
||||
'url': '{chromium_git}/external/github.com/google/googletest@bda85449f48f2d80a494c8c07766b6aba3170f3b',
|
||||
'condition': 'dawn_standalone',
|
||||
},
|
||||
# This is a dependency of //testing
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace dawn::wire::client {
|
|||
class ClientBase : public ChunkedCommandHandler, public ObjectIdProvider {
|
||||
public:
|
||||
ClientBase() = default;
|
||||
virtual ~ClientBase() = default;
|
||||
~ClientBase() override = default;
|
||||
|
||||
{% for type in by_category["object"] %}
|
||||
const ObjectAllocator<{{type.name.CamelCase()}}>& {{type.name.CamelCase()}}Allocator() const {
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace dawn::wire::server {
|
|||
class ServerBase : public ChunkedCommandHandler, public ObjectIdResolver {
|
||||
public:
|
||||
ServerBase() = default;
|
||||
virtual ~ServerBase() = default;
|
||||
~ServerBase() override = default;
|
||||
|
||||
protected:
|
||||
void DestroyAllObjects(const DawnProcTable& procs) {
|
||||
|
|
|
@ -118,6 +118,8 @@ config("internal_config") {
|
|||
"-Wredundant-move",
|
||||
"-Wshadow-field",
|
||||
"-Wstrict-prototypes",
|
||||
"-Wsuggest-destructor-override",
|
||||
"-Wsuggest-override",
|
||||
"-Wtautological-unsigned-zero-compare",
|
||||
"-Wunreachable-code-aggressive",
|
||||
"-Wunused-but-set-variable",
|
||||
|
|
|
@ -48,7 +48,7 @@ class AsyncTaskManager {
|
|||
class WaitableTask : public RefCounted {
|
||||
public:
|
||||
WaitableTask();
|
||||
~WaitableTask();
|
||||
~WaitableTask() override;
|
||||
|
||||
AsyncTask asyncTask;
|
||||
AsyncTaskManager* taskManager;
|
||||
|
|
|
@ -34,7 +34,7 @@ struct FlatComputePipelineDescriptor;
|
|||
|
||||
struct CreatePipelineAsyncCallbackTaskBase : CallbackTask {
|
||||
CreatePipelineAsyncCallbackTaskBase(std::string errorMessage, void* userData);
|
||||
~CreatePipelineAsyncCallbackTaskBase();
|
||||
~CreatePipelineAsyncCallbackTaskBase() override;
|
||||
|
||||
protected:
|
||||
std::string mErrorMessage;
|
||||
|
|
|
@ -60,7 +60,7 @@ using WGSLExtensionSet = std::unordered_set<std::string>;
|
|||
class DeviceBase : public RefCounted {
|
||||
public:
|
||||
DeviceBase(AdapterBase* adapter, const DeviceDescriptor* descriptor);
|
||||
virtual ~DeviceBase();
|
||||
~DeviceBase() override;
|
||||
|
||||
void HandleError(InternalErrorType type, const char* message);
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ class D3D11on12ResourceCacheEntry : public RefCounted {
|
|||
explicit D3D11on12ResourceCacheEntry(ComPtr<ID3D11On12Device> d3d11on12Device);
|
||||
D3D11on12ResourceCacheEntry(ComPtr<IDXGIKeyedMutex> d3d11on12Resource,
|
||||
ComPtr<ID3D11On12Device> d3d11on12Device);
|
||||
~D3D11on12ResourceCacheEntry();
|
||||
~D3D11on12ResourceCacheEntry() override;
|
||||
|
||||
MaybeError AcquireKeyedMutex();
|
||||
void ReleaseKeyedMutex();
|
||||
|
|
|
@ -48,7 +48,7 @@ class CommandBuffer final : public CommandBufferBase {
|
|||
const CommandBufferDescriptor* descriptor);
|
||||
|
||||
CommandBuffer(CommandEncoder* encoder, const CommandBufferDescriptor* descriptor);
|
||||
~CommandBuffer();
|
||||
~CommandBuffer() override;
|
||||
|
||||
MaybeError FillCommands(CommandRecordingContext* commandContext);
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ BackendConnection* Connect(InstanceBase* instance) {
|
|||
}
|
||||
|
||||
struct CopyFromStagingToBufferOperation : PendingOperation {
|
||||
virtual void Execute() {
|
||||
void Execute() override {
|
||||
destination->CopyFromStaging(staging, sourceOffset, destinationOffset, size);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ using ::testing::HasSubstr;
|
|||
|
||||
class RequestDeviceValidationTest : public ValidationTest {
|
||||
protected:
|
||||
void SetUp() {
|
||||
void SetUp() override {
|
||||
DAWN_SKIP_TEST_IF(UsesWire());
|
||||
ValidationTest::SetUp();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue