summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2019-02-08 17:42:00 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2019-02-08 17:42:00 +0000
commit346fb4bbcd3a082ee4da7b69dc44b80290204d0e (patch)
tree5fd31d02ce7c3c93df165e151b5c754e23d46d3f /clang/lib/Sema/SemaExprCXX.cpp
parent5e62adad0d3cd54c09170150e982af9d0e6cb71d (diff)
downloadbcm5719-llvm-346fb4bbcd3a082ee4da7b69dc44b80290204d0e.tar.gz
bcm5719-llvm-346fb4bbcd3a082ee4da7b69dc44b80290204d0e.zip
Revert "[OPENMP]Initial support for the delayed diagnostics."
This reverts commit r353540. Erroneously committed, need to fix the message and description. llvm-svn: 353541
Diffstat (limited to 'clang/lib/Sema/SemaExprCXX.cpp')
-rw-r--r--clang/lib/Sema/SemaExprCXX.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp
index b8431ce36ec..5ac248d36b4 100644
--- a/clang/lib/Sema/SemaExprCXX.cpp
+++ b/clang/lib/Sema/SemaExprCXX.cpp
@@ -750,13 +750,12 @@ 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)) {
- // Delay error emission for the OpenMP device code.
- if (LangOpts.OpenMP && LangOpts.OpenMPIsDevice)
- diagIfOpenMPDeviceCode(OpLoc, diag::err_exceptions_disabled) << "throw";
- else
- Diag(OpLoc, diag::err_exceptions_disabled) << "throw";
- }
+ !getSourceManager().isInSystemHeader(OpLoc) &&
+ (!getLangOpts().OpenMPIsDevice ||
+ !getLangOpts().OpenMPHostCXXExceptions ||
+ isInOpenMPTargetExecutionDirective() ||
+ isInOpenMPDeclareTargetContext()))
+ Diag(OpLoc, diag::err_exceptions_disabled) << "throw";
// Exceptions aren't allowed in CUDA device code.
if (getLangOpts().CUDA)
OpenPOWER on IntegriCloud