From 266e803a096929578f51b6ea3a0e4cad87a57cf7 Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Thu, 21 Feb 2019 15:51:30 +0000 Subject: [CUDA]Delayed diagnostics for the asm instructions. Summary: Adapted targetDiag for the CUDA and used for the delayed diagnostics in asm constructs. Works for both host and device compilation sides. Reviewers: tra, jlebar Subscribers: jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58463 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@354593 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaExprCXX.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Sema/SemaExprCXX.cpp') diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index fe1676abb9..512e256d45 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -750,7 +750,7 @@ ExprResult Sema::BuildCXXThrow(SourceLocation OpLoc, Expr *Ex, bool IsThrownVarInScope) { // Don't report an error if 'throw' is used in system headers. if (!getLangOpts().CXXExceptions && - !getSourceManager().isInSystemHeader(OpLoc)) { + !getSourceManager().isInSystemHeader(OpLoc) && !getLangOpts().CUDA) { // Delay error emission for the OpenMP device code. targetDiag(OpLoc, diag::err_exceptions_disabled) << "throw"; } -- cgit v1.2.3