[clang] 3a1f0c6 - Fix mistake made while rebasing

Stephen Kelly via cfe-commits cfe-commits at lists.llvm.org
Fri May 22 17:26:40 PDT 2020


Author: Stephen Kelly
Date: 2020-05-23T01:26:30+01:00
New Revision: 3a1f0c6bd1e09b6fd081ad83bb67228de83ac9b4

URL: https://github.com/llvm/llvm-project/commit/3a1f0c6bd1e09b6fd081ad83bb67228de83ac9b4
DIFF: https://github.com/llvm/llvm-project/commit/3a1f0c6bd1e09b6fd081ad83bb67228de83ac9b4.diff

LOG: Fix mistake made while rebasing

Added: 
    

Modified: 
    clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp

Removed: 
    


################################################################################
diff  --git a/clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp b/clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
index 648e73c4bf57..8fcaeac9cb5e 100644
--- a/clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
+++ b/clang/unittests/ASTMatchers/ASTMatchersTraversalTest.cpp
@@ -1823,13 +1823,13 @@ void stringConstruct()
                                   hasDescendant(varDecl(
                                       hasName("s"),
                                       hasInitializer(stringLiteral())))))));
-  EXPECT_TRUE(matches(
-      Code,
-      traverse(TK_IgnoreUnlessSpelledInSource,
-               functionDecl(hasName("conversionOperator"),
-                            hasDescendant(varDecl(
-                                hasName("c1"), hasInitializer(unaryOperator(
-                                                   hasOperatorName("*")))))))));
+
+  EXPECT_TRUE(
+      matches(Code, traverse(TK_IgnoreUnlessSpelledInSource,
+                             functionDecl(hasName("stringConstruct"),
+                                          hasDescendant(cxxOperatorCallExpr(
+                                              isAssignmentOperator(),
+                                              hasArgument(1, stringLiteral())))))));
 }
 
 template <typename MatcherT>


        


More information about the cfe-commits mailing list