[clang] [LifetimeSafety] Warn on incorrectly placed `[[clang::lifetimebound]]` attributes (PR #196144)
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Fri May 8 09:16:02 PDT 2026
================
@@ -467,6 +467,7 @@ enables only the high-confidence subset of these checks.
* ``-Wlifetime-safety-validations``: Enables checks that validate existing lifetime annotations.
* ``-Wlifetime-safety-noescape``: Warns when a parameter marked with ``[[clang::noescape]]`` escapes the function.
+ * ``-Wlifetime-safety-lifetimebound-violation``: Warns when a parameter marked with ``[[clang::lifetimebound]]`` is not returned from the function.
----------------
Xazax-hun wrote:
Nit: we should also change the "returned" here.
https://github.com/llvm/llvm-project/pull/196144
More information about the cfe-commits
mailing list