]> granicus.if.org Git - clang/commitdiff
Fix ASTMatchersTests to not create an overloaded-virtual warning.
authorDaniel Jasper <djasper@google.com>
Mon, 29 Oct 2012 10:48:25 +0000 (10:48 +0000)
committerDaniel Jasper <djasper@google.com>
Mon, 29 Oct 2012 10:48:25 +0000 (10:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166921 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/ASTMatchers/ASTMatchersTest.cpp
unittests/ASTMatchers/ASTMatchersTest.h

index 2602e87840eb325a0d098e7b7eea41681060ca3e..ec4312e52e0f57bd58f5831d46b9dcfd55a33572 100644 (file)
@@ -599,6 +599,10 @@ public:
     return false;
   }
 
+  virtual bool run(const BoundNodes *Nodes, ASTContext *Context) {
+    return run(Nodes);
+  }
+
 private:
   const std::string Id;
   const int ExpectedCount;
@@ -3238,6 +3242,11 @@ public:
   explicit VerifyRecursiveMatch(StringRef Id,
                                 const internal::Matcher<T> &InnerMatcher)
       : Id(Id), InnerMatcher(InnerMatcher) {}
+
+  virtual bool run(const BoundNodes *Nodes) {
+    return false;
+  }
+
   virtual bool run(const BoundNodes *Nodes, ASTContext *Context) {
     const T *Node = Nodes->getNodeAs<T>(Id);
     bool Found = false;
index 66cc9bd45074d931ef805a14451d418dc9ae02be..5e63b6bb1196ccf360e38a1b45479f015f175e22 100644 (file)
@@ -24,10 +24,8 @@ using clang::tooling::FrontendActionFactory;
 class BoundNodesCallback {
 public:
   virtual ~BoundNodesCallback() {}
-  virtual bool run(const BoundNodes *BoundNodes) { return false; }
-  virtual bool run(const BoundNodes *BoundNodes, ASTContext *Context) {
-    return run(BoundNodes);
-  }
+  virtual bool run(const BoundNodes *BoundNodes) = 0;
+  virtual bool run(const BoundNodes *BoundNodes, ASTContext *Context) = 0;
 };
 
 // If 'FindResultVerifier' is not NULL, sets *Verified to the result of