[all-commits] [llvm/llvm-project] f3a697: [analyzer] Implement UseAfterLifetimeEnd checker (...

Benedek Kaibas via All-commits all-commits at lists.llvm.org
Sun Jun 28 16:26:11 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f3a69752ac184360afeb921d157ae08b89c2c091
      https://github.com/llvm/llvm-project/commit/f3a69752ac184360afeb921d157ae08b89c2c091
  Author: Benedek Kaibas <82393336+benedekaibas at users.noreply.github.com>
  Date:   2026-06-29 (Mon, 29 Jun 2026)

  Changed paths:
    M clang/include/clang/StaticAnalyzer/Checkers/Checkers.td
    M clang/lib/StaticAnalyzer/Checkers/CMakeLists.txt
    A clang/lib/StaticAnalyzer/Checkers/UseAfterLifetimeEnd.cpp
    A clang/test/Analysis/debug-lifetime-bound.cpp
    A clang/test/Analysis/lifetime-bound.cpp

  Log Message:
  -----------
  [analyzer] Implement UseAfterLifetimeEnd checker (#205521)

Implemented the UseAfterLifetimEnd checker which is responsible for detecting lifetime safety violations involving the [[clang::lifetimebound]] annotation. This checker can catch violations in annotated code such as dangling pointer/reference bound to local variables that go out of scope. This checker is one of the reporting checkers that depend on the LifetimeModeling checker #205951. To detect dangling sources the checker queries the state at function exit points through the checkEndFunction callback. This checker does not handle lifetime issues where the code is unannotated.

Detailed work history of this checker can be found here: #200145

Co-authored-by: Balázs Benics <benicsbalazs at gmail.com>



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