[PATCH] D66538: [AST] AST structural equivalence to work internally with pairs.
Balázs Kéri via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 22 03:32:27 PDT 2019
balazske marked an inline comment as done.
balazske added inline comments.
================
Comment at: clang/unittests/AST/StructuralEquivalenceTest.cpp:1323
+ NonEquivalentDecls.end());
+ EXPECT_EQ(NonEquivalentDecls.find(std::make_pair(y1, y2)),
+ NonEquivalentDecls.end());
----------------
martong wrote:
> This should be `EXPECT_NE` ! Because `void y(A*)` is not eq to `void y(B*)`
We have no guarantee that every non-equivalent Decl will be collected in `NonEquivalentDecls`, in this concrete case only the `(A1,B2)` pair is inserted (this is why the test passes). This line is to be removed, probably the last line too (it is an implementation detail that `(A1,B2)` is inserted but not even `(C1,C2)`).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66538/new/
https://reviews.llvm.org/D66538
More information about the cfe-commits
mailing list