[clang] [LifetimeSafety] Warn on incorrectly placed `[[clang::lifetimebound]]` attributes (PR #196144)

via cfe-commits cfe-commits at lists.llvm.org
Sat May 9 05:57:00 PDT 2026


================
@@ -35,7 +35,10 @@ inline bool IsLifetimeSafetyDiagnosticEnabled(Sema &S, const Decl *D) {
          !Diags.isIgnored(diag::warn_lifetime_safety_invalidation,
                           D->getBeginLoc()) ||
          !Diags.isIgnored(diag::warn_lifetime_safety_noescape_escapes,
-                          D->getBeginLoc());
+                          D->getBeginLoc()) ||
+         !Diags.isIgnored(
+             diag::warn_lifetime_safety_param_lifetimebound_violation,
+             D->getBeginLoc());
 }
----------------
NeKon69 wrote:

I think I'll add them in this PR, I also have my own warning which I didn't put here before.

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


More information about the cfe-commits mailing list