================
@@ -987,6 +988,12 @@ void CastOperation::CheckDynamicCast() {
     return;
   }
 
+  // Similarly, dynamic_cast is not available in CUDA device code, except for
+  // dynamic_cast to void*.
+  if (Self.getLangOpts().CUDA && !DestPointee->isVoidType())
----------------
steffenlarsen wrote:

Initially I figured we should just follow the precedence set by the case above, 
but with the most recent changes I tend towards agreeing with your stance. 
@yxsamliu - Objections to also disallowing `dynamic_cast<void*>` for HIP/CUDA 
for consistency?

https://github.com/llvm/llvm-project/pull/228469
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to