[clang] extend getCommonSugaredType to merge sugar nodes
This continues D111283 by extending the getCommonSugaredType implementation to also merge non-canonical type nodes. We merge these nodes by going up starting from the canonical node, calculating their merged properties on the way. If we reach a pair that is too different, or which we could not otherwise unify, we bail out and don't try to keep going on to the next pair, in effect striping out all the remaining top-level sugar nodes. This avoids mismatching 'companion' nodes, such as ElaboratedType, so that they don't end up elaborating some other unrelated thing. Depends on D111509 Signed-off-by:Matheus Izvekov <mizvekov@gmail.com> Differential Revision: https://reviews.llvm.org/D130308
Loading
Please sign in to comment