r328750 - [astmatchers] Move a matcher out of internal namespace: blind debugging of MSVC issues

George Karpenkov via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 28 18:15:05 PDT 2018


Author: george.karpenkov
Date: Wed Mar 28 18:15:05 2018
New Revision: 328750

URL: http://llvm.org/viewvc/llvm-project?rev=328750&view=rev
Log:
[astmatchers] Move a matcher out of internal namespace: blind debugging of MSVC issues

Modified:
    cfe/trunk/lib/ASTMatchers/ASTMatchersInternal.cpp

Modified: cfe/trunk/lib/ASTMatchers/ASTMatchersInternal.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ASTMatchers/ASTMatchersInternal.cpp?rev=328750&r1=328749&r2=328750&view=diff
==============================================================================
--- cfe/trunk/lib/ASTMatchers/ASTMatchersInternal.cpp (original)
+++ cfe/trunk/lib/ASTMatchers/ASTMatchersInternal.cpp Wed Mar 28 18:15:05 2018
@@ -38,6 +38,16 @@
 
 namespace clang {
 namespace ast_matchers {
+
+AST_MATCHER_P(ObjCMessageExpr, hasAnySelectorMatcher, std::vector<std::string>,
+              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<NamedDecl> hasAnyNameFunc(ArrayR
   return internal::Matcher<NamedDecl>(new internal::HasNameMatcher(Names));
 }
 
-AST_MATCHER_P(ObjCMessageExpr, hasAnySelectorMatcher, std::vector<std::string>,
-              Matches) {
-  std::string SelString = Node.getSelector().getAsString();
-  for (const std::string &S : Matches)
-    if (S == SelString)
-      return true;
-  return false;
-}
-
 Matcher<ObjCMessageExpr> hasAnySelectorFunc(
     ArrayRef<const StringRef *> NameRefs) {
   return hasAnySelectorMatcher(vectorFromRefs(NameRefs));




More information about the cfe-commits mailing list