[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
Thu Aug 13 00:25:10 PDT 2026
================
@@ -12339,7 +12339,7 @@ QualType ASTContext::mergeObjCGCQualifiers(QualType LHS, QualType RHS) {
// id foo(); ... __strong id foo(); or: __strong id foo(); ... id foo();
// In either case, use OldReturnType to build the new function type.
const auto *F = LHS->castAs<FunctionType>();
- if (const auto *FPT = cast<FunctionProtoType>(F)) {
+ if (const auto *FPT = cast_or_null<FunctionProtoType>(F)) {
----------------
HendrikHuebner wrote:
Yeah I guess it should be a `dyn_cast`.
https://github.com/llvm/llvm-project/pull/203272
More information about the cfe-commits
mailing list