[clang] Resolve FIXME: Look at E, not M (PR #85541)

John McCall via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 28 15:36:23 PDT 2024


rjmccall wrote:

Hmm.  Well, you'd have to ask @zygoloid what he was thinking in r183721/r183859, but I don't think it's correct in general to be looking at E (the MTE sub-expression) for most of the logic here.  IIRC, the MTE sub-expression is essentially the initializer for the materialized temporary, so it should be a pr-value, which means that for ARC (and any similar features in the future that we might add with qualifier-specific ownership) it won't have the right type information to set up the destructor for the temporary.  The MTE is going to tell us the type of the I assume that's why the proposed patch in this PR ends up ignoring the half of the function that handles the ARC qualifiers.  Maybe Richard had some better representation in mind, though.

https://github.com/llvm/llvm-project/pull/85541


More information about the cfe-commits mailing list