================
@@ -46,13 +47,62 @@ class MissingOriginCollector
 
 private:
   const llvm::DenseMap<const clang::Expr *, OriginList *> &ExprToOriginList;
+  const OriginManager &OM;
   LifetimeSafetyStats &LSStats;
 };
+
+class LifetimeboundOriginTypeCollector
+    : public RecursiveASTVisitor<LifetimeboundOriginTypeCollector> {
+public:
+  bool VisitCallExpr(const CallExpr *CE) {
+    if (const auto *FD = CE->getDirectCallee())
----------------
Xazax-hun wrote:

We do not have a direct callee when we call something through a function 
pointer. I think it is fine to not support that scenario since all the lifetime 
annotations currently apply to declarations but not types. 

On the other hand, if we have named lifetimes in the future that apply to 
types, this code would need a change. I wonder if this worth just a single 
comment like: "Currently, annotations are on the functions declarations." 

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

Reply via email to