Add missing destructors found with -Wnon-virtual-dtor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169303 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index 87deccbb..d928aa9 100644
--- a/lib/Format/Format.cpp
+++ b/lib/Format/Format.cpp
@@ -686,6 +686,9 @@
StructuralError(false) {
}
+ virtual ~Formatter() {
+ }
+
tooling::Replacements format() {
UnwrappedLineParser Parser(Lex, SourceMgr, *this);
StructuralError = Parser.parse();
diff --git a/lib/Format/UnwrappedLineParser.h b/lib/Format/UnwrappedLineParser.h
index 63f3659..20ff4f5 100644
--- a/lib/Format/UnwrappedLineParser.h
+++ b/lib/Format/UnwrappedLineParser.h
@@ -71,6 +71,8 @@
class UnwrappedLineConsumer {
public:
+ virtual ~UnwrappedLineConsumer() {
+ }
virtual void formatUnwrappedLine(const UnwrappedLine &Line) = 0;
};