OSDN Git Service

Compare traversal for memoization before bound nodes container
authorStephen Kelly <steveire@gmail.com>
Sun, 19 Jan 2020 15:37:24 +0000 (15:37 +0000)
committerStephen Kelly <steveire@gmail.com>
Mon, 20 Jan 2020 11:20:04 +0000 (11:20 +0000)
clang/lib/ASTMatchers/ASTMatchFinder.cpp

index 0d1f713..39a3d8e 100644 (file)
@@ -62,9 +62,9 @@ struct MatchKey {
   ast_type_traits::TraversalKind Traversal = ast_type_traits::TK_AsIs;
 
   bool operator<(const MatchKey &Other) const {
-    return std::tie(MatcherID, Node, BoundNodes, Traversal) <
-           std::tie(Other.MatcherID, Other.Node, Other.BoundNodes,
-                    Other.Traversal);
+    return std::tie(Traversal, MatcherID, Node, BoundNodes) <
+           std::tie(Other.Traversal, Other.MatcherID, Other.Node,
+            Other.BoundNodes);
   }
 };