[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
================
@@ -624,6 +624,13 @@ Warning to detect invalidation of references.
}];
}
+def LifetimeSafetyLifetimeboundViolation : DiagGroup<"lifetime-safety-lifetimebound-violation"> {
+ code Documentation = [{
+Detects parameters marked as [[clang::lifetimebound]] for which we could not verify that the return value can be lifetime bound to them.
----------------
Xazax-hun wrote:
```suggestion
Detects parameters marked as [[clang::lifetimebound]] for which the analysis could not verify that the return value can be lifetime bound to the parameter.
```
https://github.com/llvm/llvm-project/pull/196144
More information about the cfe-commits
mailing list