This is an archive of the discontinued LLVM Phabricator instance.

[CUDA] Disallow exceptions in device code.
ClosedPublic

Authored by jlebar on Sep 28 2016, 11:56 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

jlebar updated this revision to Diff 72872.Sep 28 2016, 11:56 AM
jlebar retitled this revision from to [CUDA] Disallow exceptions in device code..
jlebar updated this object.
jlebar added a reviewer: tra.
jlebar added subscribers: jhen, cfe-commits.
tra accepted this revision.Sep 28 2016, 12:46 PM
tra edited edge metadata.

One question, LGTM otherwise.

clang/lib/Sema/SemaExprCXX.cpp
688 ↗(On Diff #72872)

Do you need/want to check returned result?

This revision is now accepted and ready to land.Sep 28 2016, 12:46 PM
jlebar marked an inline comment as done.Sep 28 2016, 12:49 PM
jlebar added inline comments.
clang/lib/Sema/SemaExprCXX.cpp
688 ↗(On Diff #72872)

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.

This revision was automatically updated to reflect the committed changes.
jlebar marked an inline comment as done.