summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2012-12-04 21:05:31 +0000
committerDaniel Jasper <djasper@google.com>2012-12-04 21:05:31 +0000
commit61bd3a1dc612af9bde0765f9f4e6c2847554d2ac (patch)
tree4917b821e137133b99a65b8b3d939e47ec471a54
parentc7cb3145a03b0c146bafae57b600c9e7ba05b12d (diff)
downloadbcm5719-llvm-61bd3a1dc612af9bde0765f9f4e6c2847554d2ac.tar.gz
bcm5719-llvm-61bd3a1dc612af9bde0765f9f4e6c2847554d2ac.zip
Add missing destructors found with -Wnon-virtual-dtor.
llvm-svn: 169303
-rw-r--r--clang/lib/Format/Format.cpp3
-rw-r--r--clang/lib/Format/UnwrappedLineParser.h2
2 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index 87deccbb376..d928aa95804 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/lib/Format/Format.cpp
@@ -686,6 +686,9 @@ public:
StructuralError(false) {
}
+ virtual ~Formatter() {
+ }
+
tooling::Replacements format() {
UnwrappedLineParser Parser(Lex, SourceMgr, *this);
StructuralError = Parser.parse();
diff --git a/clang/lib/Format/UnwrappedLineParser.h b/clang/lib/Format/UnwrappedLineParser.h
index 63f3659706b..20ff4f55d69 100644
--- a/clang/lib/Format/UnwrappedLineParser.h
+++ b/clang/lib/Format/UnwrappedLineParser.h
@@ -71,6 +71,8 @@ struct UnwrappedLine {
class UnwrappedLineConsumer {
public:
+ virtual ~UnwrappedLineConsumer() {
+ }
virtual void formatUnwrappedLine(const UnwrappedLine &Line) = 0;
};
OpenPOWER on IntegriCloud