]> granicus.if.org Git - clang/commitdiff
Appease -Wnon-virtual-dtor and fix a typo in a comment
authorMatt Beaumont-Gay <matthewbg@google.com>
Mon, 25 Jun 2012 18:27:11 +0000 (18:27 +0000)
committerMatt Beaumont-Gay <matthewbg@google.com>
Mon, 25 Jun 2012 18:27:11 +0000 (18:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159151 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/Tooling/TestVisitor.h

index 35098d94b83c157acb692c7e1a36e5e232da81f9..b92a1bac4c0369ed40ee0a572fda97ff2e566c36 100644 (file)
@@ -23,7 +23,7 @@
 
 namespace clang {
 
-/// \brief Base class for sipmle RecursiveASTVisitor based tests.
+/// \brief Base class for simple RecursiveASTVisitor based tests.
 ///
 /// This is a drop-in replacement for RecursiveASTVisitor itself, with the
 /// additional capability of running it over a snippet of code.
@@ -34,6 +34,8 @@ class TestVisitor : public RecursiveASTVisitor<T> {
 public:
   TestVisitor() { }
 
+  virtual ~TestVisitor() { }
+
   /// \brief Runs the current AST visitor over the given code.
   bool runOver(StringRef Code) {
     return tooling::runToolOnCode(CreateTestAction(), Code);
@@ -89,7 +91,7 @@ public:
   ExpectedLocationVisitor()
     : ExpectedLine(0), ExpectedColumn(0), Found(false) {}
 
-  ~ExpectedLocationVisitor() {
+  virtual ~ExpectedLocationVisitor() {
     EXPECT_TRUE(Found)
       << "Expected \"" << ExpectedMatch << "\" at " << ExpectedLine
       << ":" << ExpectedColumn << PartialMatches;