[PATCH] D31925: [compiler-rt] Add virtual destructor for __sanitizer::FlagHandlerBase

Dean Michael Berris via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 10 21:19:07 PDT 2017


dberris created this revision.
Herald added a subscriber: kubamracek.

We get warnings in -Wnon-virtual-dtor builds about a class with a
non-virtual destructor on some builds. Adding the virtual destructor
silences the warning.


https://reviews.llvm.org/D31925

Files:
  lib/sanitizer_common/sanitizer_flag_parser.h


Index: lib/sanitizer_common/sanitizer_flag_parser.h
===================================================================
--- lib/sanitizer_common/sanitizer_flag_parser.h
+++ lib/sanitizer_common/sanitizer_flag_parser.h
@@ -23,6 +23,7 @@
 class FlagHandlerBase {
  public:
   virtual bool Parse(const char *value) { return false; }
+  virtual ~FlagHandlerBase() {}
 };
 
 template <typename T>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31925.94777.patch
Type: text/x-patch
Size: 392 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170411/efac43ba/attachment.bin>


More information about the llvm-commits mailing list