[clang] Detect expiry of loans to trivially destructed types (issue id: 162862) (PR #168855)

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 20 04:03:56 PST 2025


================
@@ -2987,6 +2987,7 @@ void clang::sema::AnalysisBasedWarnings::IssueWarnings(
   AC.getCFGBuildOptions().AddInitializers = true;
   AC.getCFGBuildOptions().AddImplicitDtors = true;
   AC.getCFGBuildOptions().AddTemporaryDtors = true;
+  AC.getCFGBuildOptions().AddLifetime = true;
----------------
Xazax-hun wrote:

Since only one analysis needs this I wonder if we want to guard this by the condition that lifetime checks are enabled. 

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


More information about the cfe-commits mailing list