Add missing destructors found with -Wnon-virtual-dtor.
authorDaniel Jasper <djasper@google.com>
Tue, 4 Dec 2012 21:05:31 +0000 (21:05 +0000)
committerDaniel Jasper <djasper@google.com>
Tue, 4 Dec 2012 21:05:31 +0000 (21:05 +0000)
llvm-svn: 169303

clang/lib/Format/Format.cpp
clang/lib/Format/UnwrappedLineParser.h

index 87deccb..d928aa9 100644 (file)
@@ -686,6 +686,9 @@ public:
         StructuralError(false) {
   }
 
+  virtual ~Formatter() {
+  }
+
   tooling::Replacements format() {
     UnwrappedLineParser Parser(Lex, SourceMgr, *this);
     StructuralError = Parser.parse();
index 63f3659..20ff4f5 100644 (file)
@@ -71,6 +71,8 @@ struct UnwrappedLine {
 
 class UnwrappedLineConsumer {
 public:
+  virtual ~UnwrappedLineConsumer() {
+  }
   virtual void formatUnwrappedLine(const UnwrappedLine &Line) = 0;
 };