[clang] [clang][CodeGen] Fix invalid bitcast in InitCatchParam for non-zero address space pointers (PR #224680)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 2 02:11:20 PDT 2026
================
@@ -17528,6 +17504,22 @@ VarDecl *Sema::BuildExceptionDeclaration(Scope *S, TypeSourceInfo *TInfo,
Invalid = true;
}
+ // Reject catching of ptr's and ref's involving non-default address spaces
+ // runtimes cannot perform cross-address-space conversions yet.
+ QualType T = ExDeclType;
+ bool IsRef = false;
+ if (const auto *RT = T->getAs<ReferenceType>()) {
+ IsRef = true;
+ T = RT->getPointeeType();
+ }
+ if (T.getAddressSpace() != LangAS::Default ||
----------------
im-lunex wrote:
addressed
https://github.com/llvm/llvm-project/pull/224680
More information about the cfe-commits
mailing list