================
@@ -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) {
----------------
GkvJwa wrote:

If change here, It seems that only check `IsNormalCleanup == true`, and then a 
diagnosis can be made.

https://github.com/llvm/llvm-project/pull/172287
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to