Skip to content
Unverified Commit 16e5d6d7 authored by Matheus Izvekov's avatar Matheus Izvekov
Browse files

[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: default avatarMatheus Izvekov <mizvekov@gmail.com>

Differential Revision: https://reviews.llvm.org/D130308
parent d42122cd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment