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 35098d9..b92a1ba 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 @@
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 @@
ExpectedLocationVisitor()
: ExpectedLine(0), ExpectedColumn(0), Found(false) {}
- ~ExpectedLocationVisitor() {
+ virtual ~ExpectedLocationVisitor() {
EXPECT_TRUE(Found)
<< "Expected \"" << ExpectedMatch << "\" at " << ExpectedLine
<< ":" << ExpectedColumn << PartialMatches;