From 12535ae69d25930b438299fec7cbe6e16007e307 Mon Sep 17 00:00:00 2001 From: Naris Siamwalla Date: Mon, 19 Mar 2018 14:23:24 -0700 Subject: [PATCH] Fix clang-6 strictness surrounding virtual destructors Reviewed By: smeenai Differential Revision: D7326765 fbshipit-source-id: 9df477dfa89812e05e79b5e6d510bcbbc793381c --- ReactCommon/exceptions/ExceptionManager.h | 2 ++ .../fabric/core/componentdescriptor/ComponentDescriptor.h | 2 ++ ReactCommon/fabric/core/shadownode/Props.h | 2 ++ ReactCommon/fabric/debug/DebugStringConvertible.h | 2 ++ 4 files changed, 8 insertions(+) diff --git a/ReactCommon/exceptions/ExceptionManager.h b/ReactCommon/exceptions/ExceptionManager.h index ba07912bf..842975b3b 100644 --- a/ReactCommon/exceptions/ExceptionManager.h +++ b/ReactCommon/exceptions/ExceptionManager.h @@ -16,6 +16,8 @@ namespace react { */ class ExceptionManager { public: + virtual ~ExceptionManager() = default; + virtual void handleSoftException(const std::exception &e) const = 0; virtual void handleFatalException(const std::exception &e) const = 0; }; diff --git a/ReactCommon/fabric/core/componentdescriptor/ComponentDescriptor.h b/ReactCommon/fabric/core/componentdescriptor/ComponentDescriptor.h index 975900c91..7b7b7a557 100644 --- a/ReactCommon/fabric/core/componentdescriptor/ComponentDescriptor.h +++ b/ReactCommon/fabric/core/componentdescriptor/ComponentDescriptor.h @@ -26,6 +26,8 @@ using SharedComponentDescriptor = std::shared_ptr; class ComponentDescriptor { public: + virtual ~ComponentDescriptor() = default; + /* * Returns `componentHandle` associated with particular kind of components. * All `ShadowNode`s of this type must return same `componentHandle`. diff --git a/ReactCommon/fabric/core/shadownode/Props.h b/ReactCommon/fabric/core/shadownode/Props.h index da9f4f3b6..8a6a73834 100644 --- a/ReactCommon/fabric/core/shadownode/Props.h +++ b/ReactCommon/fabric/core/shadownode/Props.h @@ -28,6 +28,8 @@ class Props: public virtual DebugStringConvertible { public: + virtual ~Props() = default; + virtual void apply(const RawProps &rawProps); private: diff --git a/ReactCommon/fabric/debug/DebugStringConvertible.h b/ReactCommon/fabric/debug/DebugStringConvertible.h index b47d0c0d4..8ef96d888 100644 --- a/ReactCommon/fabric/debug/DebugStringConvertible.h +++ b/ReactCommon/fabric/debug/DebugStringConvertible.h @@ -31,6 +31,8 @@ struct DebugStringConvertibleOptions { class DebugStringConvertible { public: + virtual ~DebugStringConvertible() = default; + // Returns a name of the object. // Default implementation returns "Node". virtual std::string getDebugName() const;