diff options
Diffstat (limited to 'unittests/AST/MatchVerifier.h')
-rw-r--r-- | unittests/AST/MatchVerifier.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/unittests/AST/MatchVerifier.h b/unittests/AST/MatchVerifier.h index 56dcc68f20..bc8bf9ea34 100644 --- a/unittests/AST/MatchVerifier.h +++ b/unittests/AST/MatchVerifier.h @@ -34,12 +34,23 @@ public: template <typename MatcherType> testing::AssertionResult match(const std::string &Code, const MatcherType &AMatcher) { - return match(Code, AMatcher, Lang_CXX); + std::vector<std::string> Args; + return match(Code, AMatcher, Args, Lang_CXX); } template <typename MatcherType> testing::AssertionResult match(const std::string &Code, - const MatcherType &AMatcher, Language L); + const MatcherType &AMatcher, + Language L) { + std::vector<std::string> Args; + return match(Code, AMatcher, Args, L); + } + + template <typename MatcherType> + testing::AssertionResult match(const std::string &Code, + const MatcherType &AMatcher, + std::vector<std::string>& Args, + Language L); protected: virtual void run(const MatchFinder::MatchResult &Result); @@ -64,13 +75,13 @@ private: /// verifier for the matched node. template <typename NodeType> template <typename MatcherType> testing::AssertionResult MatchVerifier<NodeType>::match( - const std::string &Code, const MatcherType &AMatcher, Language L) { + const std::string &Code, const MatcherType &AMatcher, + std::vector<std::string>& Args, Language L) { MatchFinder Finder; Finder.addMatcher(AMatcher.bind(""), this); OwningPtr<tooling::FrontendActionFactory> Factory( tooling::newFrontendActionFactory(&Finder)); - std::vector<std::string> Args; StringRef FileName; switch (L) { case Lang_C: |