From: Matt Beaumont-Gay Date: Mon, 25 Jun 2012 18:27:11 +0000 (+0000) Subject: Appease -Wnon-virtual-dtor and fix a typo in a comment X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8f35d23977bf7e70bab98545db0f687da997f20f;p=clang Appease -Wnon-virtual-dtor and fix a typo in a comment git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159151 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/unittests/Tooling/TestVisitor.h b/unittests/Tooling/TestVisitor.h index 35098d94b8..b92a1bac4c 100644 --- a/unittests/Tooling/TestVisitor.h +++ b/unittests/Tooling/TestVisitor.h @@ -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 { 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;