================
@@ -4410,6 +4409,21 @@ StmtResult Sema::ActOnCXXTryBlock(SourceLocation TryLoc,
Stmt *TryBlock,
Handlers);
}
+void Sema::DiagnoseExceptionUse(SourceLocation Loc, bool IsTry) {
+ const llvm::Triple &T = Context.getTargetInfo().getTriple();
+ const bool IsOpenMPGPUTarget =
+ getLangOpts().OpenMPIsTargetDevice && (T.isNVPTX() || T.isAMDGCN());
+
+ if (IsOpenMPGPUTarget || getLangOpts().CUDA)
+ return;
+
+ if (!getLangOpts().CXXExceptions &&
+ !getSourceManager().isInSystemHeader(Loc) &&
+ !CurContext->isDependentContext()) {
----------------
erichkeane wrote:
Don't use curley braces on single-line `if` bodies.
https://github.com/llvm/llvm-project/pull/139859
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits