[all-commits] [llvm/llvm-project] ef23a9: [LifetimeSafety] Gate lifetime checks behind per-d...

Utkarsh Saxena via All-commits all-commits at lists.llvm.org
Mon Sep 7 04:54:59 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ef23a997b4e0f555d467158c0ac47357c41b1314
      https://github.com/llvm/llvm-project/commit/ef23a997b4e0f555d467158c0ac47357c41b1314
  Author: Utkarsh Saxena <usx at google.com>
  Date:   2026-09-07 (Mon, 07 Sep 2026)

  Changed paths:
    M clang/include/clang/Analysis/Analyses/LifetimeSafety/LifetimeSafety.h
    M clang/lib/Analysis/LifetimeSafety/Checker.cpp
    M clang/lib/Sema/SemaLifetimeSafety.h

  Log Message:
  -----------
  [LifetimeSafety] Gate lifetime checks behind per-diagnostic opts (#221610)

Granular Lifetime Safety Check Gating

We split `IsLifetimeSafetyEnabled` into individual check functions in
`SemaLifetimeSafety.h`.

These properties are stored in `LifetimeSafetyOpts`, which are then
checked inside the `Checker` to avoid invoking expensive reporting
functions mapping to diagnostics that are disabled.

`reportMisplacedLifetimebound` was found to be the most expensive
(possibly because it iterates on redecls).



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list