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

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 2 05:26:15 PDT 2026


================
@@ -470,6 +468,23 @@ class LifetimeChecker {
     }
   }
 
+  static bool canBeLifetimebound(QualType QT) {
+    if (QT->isReferenceType() || QT->isPointerType())
----------------
Xazax-hun wrote:

Nit: if we want to future proof for ObjC, we could use `isAnyPointerType`.

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


More information about the cfe-commits mailing list