]> granicus.if.org Git - clang/commitdiff
Fix Visual Studio build after r261574
authorHans Wennborg <hans@hanshq.net>
Mon, 22 Feb 2016 22:21:58 +0000 (22:21 +0000)
committerHans Wennborg <hans@hanshq.net>
Mon, 22 Feb 2016 22:21:58 +0000 (22:21 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261583 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/ASTMatchers/ASTMatchers.h
lib/ASTMatchers/ASTMatchersInternal.cpp

index 29cce667e1b7121ef308dc1196c313be8ea5cd54..21a49691cd78c3370327f5d5dbe422bbc40495a3 100644 (file)
@@ -1845,7 +1845,9 @@ inline internal::Matcher<Stmt> sizeOfExpr(
 ///   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.
index ad785b5d61c7f058b7431ef996627a719f4d15ed..ed48d7718a215ac3651ea41ee97b6f4aa6b56d64 100644 (file)
@@ -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;