[PATCH] D54407: Record the matcher type when storing a binding
Stephen Kelly via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 12 15:35:18 PST 2018
steveire added inline comments.
================
Comment at: include/clang/ASTMatchers/ASTMatchersInternal.h:154
+ bool operator<(const NodeEntry &other) const {
+ return DynNode < other.DynNode && NodeKind < other.NodeKind;
+ }
----------------
aaron.ballman wrote:
> This doesn't provide the right ordering guarantees. Use `std::tie()` instead: `return std::tie(DynNode, NodeKind) < std::tie(Other.DynNode, Other.NodeKind);`
Thanks, I forgot about `tie` :).
Repository:
rC Clang
https://reviews.llvm.org/D54407
More information about the cfe-commits
mailing list