[clang] [LifetimeSafety] Model scope-exit destructor and cleanup callback as a use (PR #204650)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 2 00:37:53 PST 2026


================
@@ -1,4 +1,5 @@
 // RUN: %clang_cc1 -fsyntax-only -Wlifetime-safety -Wlifetime-safety-experimental-invalidation -Wno-dangling -verify %s
+// RUN: %clang_cc1 -fsyntax-only -Wlifetime-safety -Wlifetime-safety-experimental-invalidation -Wlifetime-safety-experimental-destructor-use -Wno-dangling -verify=expected,dtor %s
----------------
usx95 wrote:

I would prefer if we have a single invocation here unless you feel the "dtor" verifications are somewhat different. That would avoid the "dtor" prefix and have a single expected prefix.

https://github.com/llvm/llvm-project/pull/204650


More information about the cfe-commits mailing list