[clang] [ObjC] Fix Assertion failure when merging declarations with different lifetime qualifiers (PR #203272)
Hendrik Hübner via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 12 02:27:53 PDT 2026
================
@@ -12356,7 +12356,8 @@ QualType ASTContext::mergeObjCGCQualifiers(QualType LHS, QualType RHS) {
if (LQuals != RQuals) {
// If any of these qualifiers are different, we have a type mismatch.
if (LQuals.getCVRQualifiers() != RQuals.getCVRQualifiers() ||
- LQuals.getAddressSpace() != RQuals.getAddressSpace())
+ LQuals.getAddressSpace() != RQuals.getAddressSpace() ||
+ LQuals.getObjCLifetime() != RQuals.getObjCLifetime())
----------------
HendrikHuebner wrote:
@ahatanak Good point. I updated the logic to fail the merge step whenever anything but the GC qualifiers are unequal.
https://github.com/llvm/llvm-project/pull/203272
More information about the cfe-commits
mailing list