[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 01:03:59 PDT 2019
balazske marked an inline comment as done.
balazske added inline comments.
================
Comment at: clang/lib/AST/ASTStructuralEquivalence.cpp:1586
- if (EquivToD1)
- return EquivToD1 == D2->getCanonicalDecl();
----------------
It looks like that the original code is correct in the decision of structural equivalence of the original pair. If we have an (A,B) and (A,C) to compare, B and C are in different decl chain, then (A,B) or (A,C) will be non-equivalent (unless B and C are equivalent, but what to do in this case?). The problem was that the code assumed that in this case always A and B (or A and C) are non-equivalent. If `NonEquivalentDecls` is not filled in this case (or not used at all) the problem does not exist.
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