From 3167b3035e8a7fc9c96e00f8e7aad9de218cd0b8 Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Fri, 22 Feb 2019 14:42:48 +0000 Subject: [CUDA]Delayed diagnostics for the asm instructions. Adapted targetDiag for the CUDA and used for the delayed diagnostics in asm constructs. Works for both host and device compilation sides. Differential Revision: https://reviews.llvm.org/D58463 llvm-svn: 354671 --- clang/lib/Sema/SemaStmt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Sema/SemaStmt.cpp') diff --git a/clang/lib/Sema/SemaStmt.cpp b/clang/lib/Sema/SemaStmt.cpp index fb5c2dacc80..07af218b77c 100644 --- a/clang/lib/Sema/SemaStmt.cpp +++ b/clang/lib/Sema/SemaStmt.cpp @@ -3993,7 +3993,7 @@ StmtResult Sema::ActOnCXXTryBlock(SourceLocation TryLoc, Stmt *TryBlock, ArrayRef Handlers) { // Don't report an error if 'try' is used in system headers. if (!getLangOpts().CXXExceptions && - !getSourceManager().isInSystemHeader(TryLoc)) { + !getSourceManager().isInSystemHeader(TryLoc) && !getLangOpts().CUDA) { // Delay error emission for the OpenMP device code. targetDiag(TryLoc, diag::err_exceptions_disabled) << "try"; } -- cgit v1.2.3