aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Beaumont-Gay <matthewbg@google.com>2012-06-25 18:27:11 +0000
committerMatt Beaumont-Gay <matthewbg@google.com>2012-06-25 18:27:11 +0000
commit8f35d23977bf7e70bab98545db0f687da997f20f (patch)
tree170594b68fe0674236f8299473bf63c2614ead12
parent6b02009359a462ffe633696a4441313b462e6566 (diff)
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
-rw-r--r--unittests/Tooling/TestVisitor.h6
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;