[clang] [clang] Remove the EnableLifetimeWarnings flag in lifetime analysis. (PR #105884)

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 4 04:20:21 PDT 2024


================
@@ -393,11 +392,9 @@ static void visitFunctionCallArguments(IndirectLocalPath &Path, Expr *Call,
     Path.push_back({IndirectLocalPathEntry::LifetimeBoundCall, Arg, D});
     if (Arg->isGLValue())
       visitLocalsRetainedByReferenceBinding(Path, Arg, RK_ReferenceBinding,
-                                            Visit,
-                                            /*EnableLifetimeWarnings=*/false);
+                                            Visit);
     else
-      visitLocalsRetainedByInitializer(Path, Arg, Visit, true,
-                                       /*EnableLifetimeWarnings=*/false);
----------------
hokein wrote:

Good point. It is hard to split in two PRs, refined the PR to focus on the bug fixes rather than the refactoring change.

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


More information about the cfe-commits mailing list