diff options
author | Matt Beaumont-Gay <matthewbg@google.com> | 2012-06-25 18:27:11 +0000 |
---|---|---|
committer | Matt Beaumont-Gay <matthewbg@google.com> | 2012-06-25 18:27:11 +0000 |
commit | a0e2c04c24e7434fe9cdedbaac6e14030ab61b37 (patch) | |
tree | 4028f4e54c988605fed38b06cb3bcfb37a73f984 /clang/unittests/Tooling/TestVisitor.h | |
parent | a57fc12ec929c6d762e68f53c0f9ae17be2e2d51 (diff) | |
download | bcm5719-llvm-a0e2c04c24e7434fe9cdedbaac6e14030ab61b37.tar.gz bcm5719-llvm-a0e2c04c24e7434fe9cdedbaac6e14030ab61b37.zip |
Appease -Wnon-virtual-dtor and fix a typo in a comment
llvm-svn: 159151
Diffstat (limited to 'clang/unittests/Tooling/TestVisitor.h')
-rw-r--r-- | clang/unittests/Tooling/TestVisitor.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/unittests/Tooling/TestVisitor.h b/clang/unittests/Tooling/TestVisitor.h index 35098d94b83..b92a1bac4c0 100644 --- a/clang/unittests/Tooling/TestVisitor.h +++ b/clang/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; |