[all-commits] [llvm/llvm-project] a509a4: [LifetimeSafety] Enable C support by default under...

Benedek Kaibas via All-commits all-commits at lists.llvm.org
Fri Sep 25 06:07:17 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a509a4e98a50a2acc172a5f6eba77b8df020e3cd
      https://github.com/llvm/llvm-project/commit/a509a4e98a50a2acc172a5f6eba77b8df020e3cd
  Author: Benedek Kaibas <82393336+benedekaibas at users.noreply.github.com>
  Date:   2026-09-25 (Fri, 25 Sep 2026)

  Changed paths:
    M clang/docs/LifetimeSafety.md
    M clang/docs/ReleaseNotes.md
    M clang/include/clang/Basic/LangOptions.def
    M clang/include/clang/Options/Options.td
    M clang/lib/Driver/ToolChains/Clang.cpp
    A clang/test/Driver/flifetime-safety-c.c
    M clang/test/Sema/LifetimeSafety/annotation-suggestions-fixits.c
    M clang/test/Sema/LifetimeSafety/safety-c.c

  Log Message:
  -----------
  [LifetimeSafety] Enable C support by default under -Wlifetime-safety (#224028)

This PR extends the lifetime safety analysis to C. When the analysis is
enabled with `-Wlifetime-safety`, it now also runs on C code without the
extra `-fexperimental-lifetime-safety-c` flag.

I have renamed `-fexperimental-lifetime-safety-c` to
`-flifetime-safety-c` since it is on by default from now on. The
`-fno-lifetime-safety-c` flag disables the analysis for C. I have
updated the documentation and the release notes and rewrote the RUN
lines of the test cases that used the old flag.



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