================
@@ -0,0 +1,46 @@
+// RUN: %clang_cc1 -fsyntax-only -fcxx-exceptions -fexceptions -fms-extensions 
-verify %s
+
+// Test for issue (https://github.com/llvm/llvm-project/issues/222931).
+// Reject throwing/catching pointers and references whose pointee/referred type
+// has a non-default address space; runtimes don't yet support cross-address-
+// space conversions.
+
+// catch of a reference to a pointer (T*&), are not rejected by the 
Mode/BaseType
+// check.
----------------
efriedma-quic wrote:

Oh, hmm, I think we actually do need to reject here?

In T*&, both the pointer and the reference need to be address-space zero, for 
different reasons.  (The reference points to a local alloca, the pointer is the 
pointer returned by cxa_begin_catch.)

Sorry, I didn't realize this would be an issue until now

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