[clang] [Lifetime Safety] Highlight lifetimebound calls in alias chain diagnostics (PR #206337)

via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 20 05:37:47 PDT 2026


================
@@ -56,6 +60,25 @@ getImplicitObjectParamLifetimeBoundAttr(const FunctionDecl *FD);
 /// method or because it's a normal assignment operator.
 bool implicitObjectParamIsLifetimeBound(const FunctionDecl *FD);
 
+using LifetimeBoundParamInfo =
+    llvm::PointerUnion<const ParmVarDecl *, const CXXMethodDecl *>;
+
+/// Returns the callee and arguments corresponding to Call. For instance member
+/// calls, Args includes the implicit object argument as argument 0.
+std::pair<const FunctionDecl *, llvm::SmallVector<const Expr *, 4>>
+getFunctionCallInfo(const Expr *Call);
----------------
iitianpushkar wrote:

I think `getFunctionCallInfo` is still reasonable here but I can rename it if you prefer. Maybe `getNormalizedCallInfo` or `getDestructuredCallInfo` or anything if you suggest.

I also looked at `AnyCall`. It seems close on the callee/parameter side, so, will need to add some accessor for the args, as you suggested. But, i think we can do that in a separate pr and keep this pr targeted.

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


More information about the cfe-commits mailing list