summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExprCXX.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2019-02-20 19:37:17 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2019-02-20 19:37:17 +0000
commit7feae0585825c9357f64242b63fd4bbb27ff020c (patch)
tree71ea87b752a78ea9ac83b98cfd956a94de06909f /clang/lib/Sema/SemaExprCXX.cpp
parentc0fdd046c32277b6736d04c28cf1f3696fc4c576 (diff)
downloadbcm5719-llvm-7feae0585825c9357f64242b63fd4bbb27ff020c.tar.gz
bcm5719-llvm-7feae0585825c9357f64242b63fd4bbb27ff020c.zip
[OPENMP] Use targetDiag for diagnostics of unsupported exceptions, NFC.
llvm-svn: 354509
Diffstat (limited to 'clang/lib/Sema/SemaExprCXX.cpp')
-rw-r--r--clang/lib/Sema/SemaExprCXX.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp
index b8431ce36ec..fe1676abb93 100644
--- a/clang/lib/Sema/SemaExprCXX.cpp
+++ b/clang/lib/Sema/SemaExprCXX.cpp
@@ -752,10 +752,7 @@ ExprResult Sema::BuildCXXThrow(SourceLocation OpLoc, Expr *Ex,
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";
+ targetDiag(OpLoc, diag::err_exceptions_disabled) << "throw";
}
// Exceptions aren't allowed in CUDA device code.
OpenPOWER on IntegriCloud