================
@@ -358,6 +362,18 @@ class LifetimeChecker {
     }
   }
 
+  void reportLifetimeboundViolations() {
+    if (!isa<FunctionDecl>(FD))
+      return;
+    for (const ParmVarDecl *PVD : cast<FunctionDecl>(FD)->parameters()) {
+      if (!PVD->hasAttr<LifetimeBoundAttr>())
+        continue;
+      if (!PVD->getAttr<LifetimeBoundAttr>()->isImplicit() &&
----------------
usx95 wrote:

Maybe not do this for STL but still do for other implicit annotation. 

That said, implicit annotation violation is not actionable by the user so I am 
fine not having for these at all as currently. If we want to detect this, 
assert fail is better suited here ?

https://github.com/llvm/llvm-project/pull/196144
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to