Enable "-Winconsistent-missing-destructor-override".

This is purely a code style and consistency warning. Enabled to
support building in Skia.

Bug: angleproject:4046
Change-Id: Ibdcd06ded0195123e52c693851c43d0864e54ad1
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1877480
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This commit is contained in:
Jamie Madill 2019-10-24 12:55:11 -04:00 коммит произвёл Commit Bot
Родитель ec14fd5a24
Коммит 16370a65a4
11 изменённых файлов: 36 добавлений и 19 удалений

Просмотреть файл

@ -139,6 +139,7 @@ config("extra_warnings") {
cflags += [
"-Wextra-semi-stmt",
"-Wfloat-conversion",
"-Winconsistent-missing-destructor-override",
"-Wmissing-field-initializers",
"-Wnon-virtual-dtor",
"-Wredundant-parens",

Просмотреть файл

@ -377,4 +377,14 @@ std::ostream &FmtHex(std::ostream &os, T value)
# define ANGLE_REENABLE_SHADOWING_WARNING
#endif
#if defined(__clang__)
# define ANGLE_DISABLE_DESTRUCTOR_OVERRIDE_WARNING \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Winconsistent-missing-destructor-override\"")
# define ANGLE_REENABLE_DESTRUCTOR_OVERRIDE_WARNING _Pragma("clang diagnostic pop")
#else
# define ANGLE_DISABLE_DESTRUCTOR_OVERRIDE_WARNING
# define ANGLE_REENABLE_DESTRUCTOR_OVERRIDE_WARNING
#endif
#endif // COMMON_DEBUG_H_

Просмотреть файл

@ -594,7 +594,7 @@ class TIntermAggregate : public TIntermOperator, public TIntermAggregateBase
static TIntermAggregate *CreateBuiltInFunctionCall(const TFunction &func,
TIntermSequence *arguments);
static TIntermAggregate *CreateConstructor(const TType &type, TIntermSequence *arguments);
~TIntermAggregate() {}
~TIntermAggregate() override {}
// Note: only supported for nodes that can be a part of an expression.
TIntermTyped *deepCopy() const override { return new TIntermAggregate(*this); }
@ -671,7 +671,7 @@ class TIntermBlock : public TIntermNode, public TIntermAggregateBase
{
public:
TIntermBlock() : TIntermNode() {}
~TIntermBlock() {}
~TIntermBlock() override {}
TIntermBlock *getAsBlock() override { return this; }
void traverse(TIntermTraverser *it) final;
@ -703,7 +703,7 @@ class TIntermFunctionPrototype : public TIntermTyped
{
public:
TIntermFunctionPrototype(const TFunction *function);
~TIntermFunctionPrototype() {}
~TIntermFunctionPrototype() override {}
TIntermFunctionPrototype *getAsFunctionPrototypeNode() override { return this; }
void traverse(TIntermTraverser *it) final;
@ -773,7 +773,7 @@ class TIntermDeclaration : public TIntermNode, public TIntermAggregateBase
{
public:
TIntermDeclaration() : TIntermNode() {}
~TIntermDeclaration() {}
~TIntermDeclaration() override {}
TIntermDeclaration *getAsDeclarationNode() override { return this; }
bool visit(Visit visit, TIntermTraverser *it) final;

Просмотреть файл

@ -52,7 +52,7 @@ class OutputHLSL : public TIntermTraverser
PerformanceDiagnostics *perfDiagnostics,
const std::vector<InterfaceBlock> &shaderStorageBlocks);
~OutputHLSL();
~OutputHLSL() override;
void output(TIntermNode *treeRoot, TInfoSinkBase &objSink);

Просмотреть файл

@ -50,7 +50,7 @@ class TInvariantQualifierWrapper final : public TQualifierWrapperBase
{
public:
TInvariantQualifierWrapper(const TSourceLoc &line) : TQualifierWrapperBase(line) {}
~TInvariantQualifierWrapper() {}
~TInvariantQualifierWrapper() override {}
TQualifierType getType() const override { return QtInvariant; }
ImmutableString getQualifierString() const override { return ImmutableString("invariant"); }
@ -63,7 +63,7 @@ class TInterpolationQualifierWrapper final : public TQualifierWrapperBase
TInterpolationQualifierWrapper(TQualifier interpolationQualifier, const TSourceLoc &line)
: TQualifierWrapperBase(line), mInterpolationQualifier(interpolationQualifier)
{}
~TInterpolationQualifierWrapper() {}
~TInterpolationQualifierWrapper() override {}
TQualifierType getType() const override { return QtInterpolation; }
ImmutableString getQualifierString() const override
@ -83,7 +83,7 @@ class TLayoutQualifierWrapper final : public TQualifierWrapperBase
TLayoutQualifierWrapper(TLayoutQualifier layoutQualifier, const TSourceLoc &line)
: TQualifierWrapperBase(line), mLayoutQualifier(layoutQualifier)
{}
~TLayoutQualifierWrapper() {}
~TLayoutQualifierWrapper() override {}
TQualifierType getType() const override { return QtLayout; }
ImmutableString getQualifierString() const override { return ImmutableString("layout"); }
@ -100,7 +100,7 @@ class TStorageQualifierWrapper final : public TQualifierWrapperBase
TStorageQualifierWrapper(TQualifier storageQualifier, const TSourceLoc &line)
: TQualifierWrapperBase(line), mStorageQualifier(storageQualifier)
{}
~TStorageQualifierWrapper() {}
~TStorageQualifierWrapper() override {}
TQualifierType getType() const override { return QtStorage; }
ImmutableString getQualifierString() const override
@ -120,7 +120,7 @@ class TPrecisionQualifierWrapper final : public TQualifierWrapperBase
TPrecisionQualifierWrapper(TPrecision precisionQualifier, const TSourceLoc &line)
: TQualifierWrapperBase(line), mPrecisionQualifier(precisionQualifier)
{}
~TPrecisionQualifierWrapper() {}
~TPrecisionQualifierWrapper() override {}
TQualifierType getType() const override { return QtPrecision; }
ImmutableString getQualifierString() const override
@ -140,7 +140,7 @@ class TMemoryQualifierWrapper final : public TQualifierWrapperBase
TMemoryQualifierWrapper(TQualifier memoryQualifier, const TSourceLoc &line)
: TQualifierWrapperBase(line), mMemoryQualifier(memoryQualifier)
{}
~TMemoryQualifierWrapper() {}
~TMemoryQualifierWrapper() override {}
TQualifierType getType() const override { return QtMemory; }
ImmutableString getQualifierString() const override

Просмотреть файл

@ -44,7 +44,7 @@ class ShaderStorageBlockOutputHLSL : public TIntermTraverser
ResourcesHLSL *resourcesHLSL,
const std::vector<InterfaceBlock> &shaderStorageBlocks);
~ShaderStorageBlockOutputHLSL();
~ShaderStorageBlockOutputHLSL() override;
// This writes part of the function call to store a value to a SSBO to the output stream. After
// calling this, ", <stored value>)" should be written to the output stream to complete the

Просмотреть файл

@ -10,6 +10,13 @@
#ifndef UTIL_FUCHSIA_SCENIC_WINDOW_H
#define UTIL_FUCHSIA_SCENIC_WINDOW_H
#include "common/debug.h"
#include "util/OSWindow.h"
#include "util/util_export.h"
// Disable ANGLE-specific warnings that pop up in fuchsia headers.
ANGLE_DISABLE_DESTRUCTOR_OVERRIDE_WARNING
#include <fuchsia/ui/policy/cpp/fidl.h>
#include <fuchsia/ui/scenic/cpp/fidl.h>
#include <fuchsia_egl.h>
@ -20,8 +27,7 @@
#include <zircon/types.h>
#include <string>
#include "util/OSWindow.h"
#include "util/util_export.h"
ANGLE_REENABLE_DESTRUCTOR_OVERRIDE_WARNING
struct FuchsiaEGLWindowDeleter
{
@ -32,7 +38,7 @@ class ANGLE_UTIL_EXPORT ScenicWindow : public OSWindow
{
public:
ScenicWindow();
~ScenicWindow();
~ScenicWindow() override;
// OSWindow:
bool initialize(const std::string &name, int width, int height) override;

Просмотреть файл

@ -33,7 +33,7 @@ class OSXWindow : public OSWindow
{
public:
OSXWindow();
~OSXWindow();
~OSXWindow() override;
bool initialize(const std::string &name, int width, int height) override;
void destroy() override;

Просмотреть файл

@ -17,7 +17,7 @@ class OzoneWindow : public OSWindow
{
public:
OzoneWindow();
~OzoneWindow();
~OzoneWindow() override;
bool initialize(const std::string &name, int width, int height) override;
void destroy() override;

Просмотреть файл

@ -39,7 +39,7 @@ class CustomStackWalker : public StackWalker
{
public:
CustomStackWalker() {}
~CustomStackWalker() {}
~CustomStackWalker() override {}
void OnCallstackEntry(CallstackEntryType eType, CallstackEntry &entry) override
{

Просмотреть файл

@ -22,7 +22,7 @@ class ANGLE_UTIL_EXPORT X11Window : public OSWindow
public:
X11Window();
X11Window(int visualId);
~X11Window();
~X11Window() override;
bool initialize(const std::string &name, int width, int height) override;
void destroy() override;