r261583 - Fix Visual Studio build after r261574

Hans Wennborg via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 22 14:21:58 PST 2016


Author: hans
Date: Mon Feb 22 16:21:58 2016
New Revision: 261583

URL: http://llvm.org/viewvc/llvm-project?rev=261583&view=rev
Log:
Fix Visual Studio build after r261574

Modified:
    cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h
    cfe/trunk/lib/ASTMatchers/ASTMatchersInternal.cpp

Modified: cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h?rev=261583&r1=261582&r2=261583&view=diff
==============================================================================
--- cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h (original)
+++ cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h Mon Feb 22 16:21:58 2016
@@ -1845,7 +1845,9 @@ inline internal::Matcher<Stmt> sizeOfExp
 ///   namespace a { namespace b { class X; } }
 /// \endcode
 inline internal::Matcher<NamedDecl> hasName(const std::string &Name) {
-  return internal::Matcher<NamedDecl>(new internal::HasNameMatcher({Name}));
+  std::vector<std::string> Names;
+  Names.push_back(Name);
+  return internal::Matcher<NamedDecl>(new internal::HasNameMatcher(Names));
 }
 
 /// \brief Matches NamedDecl nodes that have any of the specified names.

Modified: cfe/trunk/lib/ASTMatchers/ASTMatchersInternal.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ASTMatchers/ASTMatchersInternal.cpp?rev=261583&r1=261582&r2=261583&view=diff
==============================================================================
--- cfe/trunk/lib/ASTMatchers/ASTMatchersInternal.cpp (original)
+++ cfe/trunk/lib/ASTMatchers/ASTMatchersInternal.cpp Mon Feb 22 16:21:58 2016
@@ -369,7 +369,7 @@ public:
   /// Return true if there are still any patterns left.
   bool consumeNameSuffix(StringRef NodeName, bool CanSkip) {
     for (size_t I = 0; I < Patterns.size();) {
-      if (internal::consumeNameSuffix(Patterns[I].Pattern, NodeName) ||
+      if (internal::consumeNameSuffix(Patterns[I].P, NodeName) ||
           CanSkip) {
         ++I;
       } else {
@@ -384,14 +384,14 @@ public:
   /// 'fully qualified' requirement.
   bool foundMatch(bool AllowFullyQualified) const {
     for (auto& P: Patterns)
-      if (P.Pattern.empty() && (AllowFullyQualified || !P.IsFullyQualified))
+      if (P.P.empty() && (AllowFullyQualified || !P.IsFullyQualified))
         return true;
     return false;
   }
 
 private:
   struct Pattern {
-    StringRef Pattern;
+    StringRef P;
     bool IsFullyQualified;
   };
   llvm::SmallVector<Pattern, 8> Patterns;




More information about the cfe-commits mailing list