================
@@ -4515,6 +4515,57 @@ void Sema::DiagnoseExceptionUse(SourceLocation Loc, bool
IsTry) {
targetDiag(Loc, diag::err_exceptions_disabled) << (IsTry ? "try" :
"throw");
}
+// Walk the statement subtree and return the first statement that
+// contains a non-trivial C++ object that would require destruction at
+// scope exit, or nullptr if none was found.
+static const Stmt *findNonTrivialObject(Sema &S, const Stmt *Node) {
----------------
MuellerMP wrote:
Also the reason why I suggest emitting a diagnostic rather than handling this
in the backend is that there are a lot of open choices if you mix C++ EHa and
SEH like e.g. what personality is chosen. The borland compiler might have a
working solution which you could look at, but just handling this the way MSVC
does seem to be a lot easier.
https://github.com/llvm/llvm-project/pull/172287
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits