Add missing virtual destructors reported by -Wnon-virtual-dtor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169365 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp b/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp
index f753509..a02301f 100644
--- a/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp
+++ b/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp
@@ -33,6 +33,7 @@
 /// Checks for the init, dealloc, and any other functions that might be allowed
 /// to perform direct instance variable assignment based on their name.
 struct MethodFilter {
+  virtual ~MethodFilter() {}
   virtual bool operator()(ObjCMethodDecl *M) {
     if (M->getMethodFamily() == OMF_init ||
         M->getMethodFamily() == OMF_dealloc ||
@@ -203,6 +204,7 @@
 // with __attribute__((annotate("objc_no_direct_instance_variable_assignmemt"))).
 namespace {
 struct InvalidatorMethodFilter : MethodFilter {
+  virtual ~InvalidatorMethodFilter() {}
   virtual bool operator()(ObjCMethodDecl *M) {
     for (specific_attr_iterator<AnnotateAttr>
          AI = M->specific_attr_begin<AnnotateAttr>(),