[cfe-dev] [PATCH 3/3] Fix virtual class with non-virtual dtor complaint

Dan Albert danalbert at google.com
Wed Apr 16 09:33:25 PDT 2014


Fixes compiler complaint about:
src/Unwind/UnwindCursor.hpp:366:25: error: 'libunwind::AbstractUnwindCursor' has virtual functions but non-virtual destructor [-Werror,-Wnon-virtual-dtor]
---
 src/Unwind/UnwindCursor.hpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/Unwind/UnwindCursor.hpp b/src/Unwind/UnwindCursor.hpp
index aa14dd1..035e471 100644
--- a/src/Unwind/UnwindCursor.hpp
+++ b/src/Unwind/UnwindCursor.hpp
@@ -365,6 +365,7 @@ private:
 
 class _LIBUNWIND_HIDDEN AbstractUnwindCursor {
 public:
+  virtual             ~AbstractUnwindCursor() {}
   virtual bool        validReg(int) = 0;
   virtual unw_word_t  getReg(int) = 0;
   virtual void        setReg(int, unw_word_t) = 0;
-- 
1.9.1.423.g4596e3a




More information about the cfe-dev mailing list