[clang] [clang] Fix sema on ObjCLifetime conversion (PR #178524)
Oliver Hunt via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 28 23:53:09 PST 2026
================
@@ -5664,6 +5671,14 @@ static void TryReferenceInitializationCore(Sema &S,
Sequence.AddQualificationConversionStep(cv1T4WithAS, ValueKind);
cv1T4 = cv1T4WithAS;
}
+ // Add ObjC lifetime conversion if required.
+ if (T1Quals.getObjCLifetime() != T2Quals.getObjCLifetime()) {
+ auto T4Quals = cv1T4.getQualifiers();
+ T4Quals.setObjCLifetime(T1Quals.getObjCLifetime());
+ QualType cv1T4WithLifetime = S.Context.getQualifiedType(T2, T4Quals);
----------------
ojhunt wrote:
This new code so `CV1T4WithLifetime` perhaps? (actual naming up to you, but lets just make new code match the current codebase style rules)
https://github.com/llvm/llvm-project/pull/178524
More information about the cfe-commits
mailing list