From: George Karpenkov Date: Thu, 29 Mar 2018 01:15:05 +0000 (+0000) Subject: [astmatchers] Move a matcher out of internal namespace: blind debugging of MSVC issues X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=85c1a32cd398e0e5dbb965a4e0d8ee25899cde62;p=clang [astmatchers] Move a matcher out of internal namespace: blind debugging of MSVC issues git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@328750 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/ASTMatchers/ASTMatchersInternal.cpp b/lib/ASTMatchers/ASTMatchersInternal.cpp index 5351ffee54..eede896ce1 100644 --- a/lib/ASTMatchers/ASTMatchersInternal.cpp +++ b/lib/ASTMatchers/ASTMatchersInternal.cpp @@ -38,6 +38,16 @@ namespace clang { namespace ast_matchers { + +AST_MATCHER_P(ObjCMessageExpr, hasAnySelectorMatcher, std::vector, + Matches) { + std::string SelString = Node.getSelector().getAsString(); + for (const std::string &S : Matches) + if (S == SelString) + return true; + return false; +} + namespace internal { bool NotUnaryOperator(const ast_type_traits::DynTypedNode &DynNode, @@ -328,15 +338,6 @@ Matcher hasAnyNameFunc(ArrayRef NameRefs) { return internal::Matcher(new internal::HasNameMatcher(Names)); } -AST_MATCHER_P(ObjCMessageExpr, hasAnySelectorMatcher, std::vector, - Matches) { - std::string SelString = Node.getSelector().getAsString(); - for (const std::string &S : Matches) - if (S == SelString) - return true; - return false; -} - Matcher hasAnySelectorFunc( ArrayRef NameRefs) { return hasAnySelectorMatcher(vectorFromRefs(NameRefs));