[PATCH] D25036: [CUDA] Disallow exceptions in device code.

Justin Lebar via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 28 12:49:01 PDT 2016

jlebar marked an inline comment as done.

Comment at: clang/lib/Sema/SemaExprCXX.cpp:688
@@ +687,3 @@
+  if (getLangOpts().CUDA)
+    CheckCUDAExceptionExpr(OpLoc, "throw");
tra wrote:
> Do you need/want to check returned result?
We could, and we could return ExprError here, but I thought it would make sense to do the same thing that we do right above, for -fno-exceptions: Continue parsing as normal, since we in fact *can* understand what the user is trying to do.  In theory (certainly for try/catch) this will let us emit better errors elsewhere.


More information about the cfe-commits mailing list