[clang] [LifetimeSafety] Warn on meaningless [[clang::lifetimebound]] parameters (PR #201101)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 2 05:28:55 PDT 2026


================
@@ -11034,6 +11034,11 @@ def warn_lifetime_safety_cross_tu_misplaced_lifetimebound
       InGroup<LifetimeSafetyCrossTUMisplacedLifetimebound>,
       DefaultIgnore;
 
+def warn_lifetime_safety_meaningless_lifetimebound
+    : Warning<"'lifetimebound' attribute has no effect on parameter of type %0">,
----------------
NeKon69 wrote:

Can this ever happen? Isn't `lifetimebound` always meaningful on implicit object parameters?

https://github.com/llvm/llvm-project/pull/201101


More information about the cfe-commits mailing list