[clang] 122443a - Compare traversal for memoization before bound nodes container

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 20 04:42:24 PST 2020


On Mon, Jan 20, 2020 at 6:20 AM Stephen Kelly via cfe-commits
<cfe-commits at lists.llvm.org> wrote:
>
>
> Author: Stephen Kelly
> Date: 2020-01-20T11:20:04Z
> New Revision: 122443a950521c5d99a0d0479daf57fbd1de2ac2
>
> URL: https://github.com/llvm/llvm-project/commit/122443a950521c5d99a0d0479daf57fbd1de2ac2
> DIFF: https://github.com/llvm/llvm-project/commit/122443a950521c5d99a0d0479daf57fbd1de2ac2.diff
>
> LOG: Compare traversal for memoization before bound nodes container

Is this change missing test cases, or was there existing coverage that
was broken which this change is fixing?

~Aaron

>
> Added:
>
>
> Modified:
>     clang/lib/ASTMatchers/ASTMatchFinder.cpp
>
> Removed:
>
>
>
> ################################################################################
> diff  --git a/clang/lib/ASTMatchers/ASTMatchFinder.cpp b/clang/lib/ASTMatchers/ASTMatchFinder.cpp
> index 0d1f713db8d3..39a3d8e3750c 100644
> --- a/clang/lib/ASTMatchers/ASTMatchFinder.cpp
> +++ b/clang/lib/ASTMatchers/ASTMatchFinder.cpp
> @@ -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);
>    }
>  };
>
>
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


More information about the cfe-commits mailing list