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.
if (!getLangOpts().CXXExceptions &&
!getSourceManager().isInSystemHeader(TryLoc)) {
// Delay error emission for the OpenMP device code.
- if (LangOpts.OpenMP && LangOpts.OpenMPIsDevice)
- diagIfOpenMPDeviceCode(TryLoc, diag::err_exceptions_disabled) << "try";
- else
- Diag(TryLoc, diag::err_exceptions_disabled) << "try";
+ targetDiag(TryLoc, diag::err_exceptions_disabled) << "try";
}
// Exceptions aren't allowed in CUDA device code.