[clang] [ObjC] Fix Assertion failure when merging declarations with different lifetime qualifiers (PR #203272)
Akira Hatanaka via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 11 18:58:28 PDT 2026
Hendrik =?utf-8?q?Hübner?= <hhuebner at MacBookPro.localdomain>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/203272 at github.com>
================
@@ -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())
----------------
ahatanak wrote:
Stepping back, I think this problem goes away if we remove ObjC GC support from clang. This crash lives in `mergeObjCGCQualifiers` and dropping GC removes the path entirely. @rjmccall
https://discourse.llvm.org/t/rfc-removing-objective-c-garbage-collection-from-clang/43261
https://github.com/llvm/llvm-project/pull/203272
More information about the cfe-commits
mailing list