[cfe-commits] r159151 - /cfe/trunk/unittests/Tooling/TestVisitor.h

Matt Beaumont-Gay matthewbg at google.com
Mon Jun 25 11:27:11 PDT 2012


Author: matthewbg
Date: Mon Jun 25 13:27:11 2012
New Revision: 159151

URL: http://llvm.org/viewvc/llvm-project?rev=159151&view=rev
Log:
Appease -Wnon-virtual-dtor and fix a typo in a comment

Modified:
    cfe/trunk/unittests/Tooling/TestVisitor.h

Modified: cfe/trunk/unittests/Tooling/TestVisitor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Tooling/TestVisitor.h?rev=159151&r1=159150&r2=159151&view=diff
==============================================================================
--- cfe/trunk/unittests/Tooling/TestVisitor.h (original)
+++ cfe/trunk/unittests/Tooling/TestVisitor.h Mon Jun 25 13:27:11 2012
@@ -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;





More information about the cfe-commits mailing list