diff options
-rw-r--r-- | unittests/Tooling/TestVisitor.h | 6 |
1 files changed, 4 insertions, 2 deletions
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<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; |