================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to