[clang] [LifetimeSafety] Model scope-exit destructor and cleanup callback as a use (PR #204650)
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 2 01:52:39 PST 2026
================
@@ -79,6 +79,11 @@ inline bool ShouldCheckFieldOriginEscape(Sema &S, const Decl *D) {
diag::warn_lifetime_safety_field_origin_escape, D->getBeginLoc());
}
+inline bool ShouldCheckDestructorUses(Sema &S, const Decl *D) {
+ return !S.getDiagnostics().isIgnored(
+ diag::warn_lifetime_safety_destructor_use_after_scope, D->getBeginLoc());
----------------
Xazax-hun wrote:
Done.
https://github.com/llvm/llvm-project/pull/204650
More information about the cfe-commits
mailing list