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.
public:
TestVisitor() { }
+ virtual ~TestVisitor() { }
+
/// \brief Runs the current AST visitor over the given code.
bool runOver(StringRef Code) {
return tooling::runToolOnCode(CreateTestAction(), Code);
ExpectedLocationVisitor()
: ExpectedLine(0), ExpectedColumn(0), Found(false) {}
- ~ExpectedLocationVisitor() {
+ virtual ~ExpectedLocationVisitor() {
EXPECT_TRUE(Found)
<< "Expected \"" << ExpectedMatch << "\" at " << ExpectedLine
<< ":" << ExpectedColumn << PartialMatches;