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

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 13 03:09:12 PDT 2026


================
@@ -105,6 +107,92 @@ bool implicitObjectParamIsLifetimeBound(const FunctionDecl *FD) {
   return isNormalAssignmentOperator(FD);
 }
 
+std::optional<LifetimeBoundParamInfo>
+getLifetimeBoundParamInfo(const FunctionDecl *FD, unsigned I) {
----------------
Xazax-hun wrote:

I am confused. I still see a lot of new code added and this seems to be largely a duplicate of what the `FactsGenerator` is doing. We do not want to have multiple copies of (maybe significantly altered version) of the same code. What I advocated for is reusing the logic what we already have in `FactsGenerator`. E.g., factoring that code out somewhere so both `FactGenerator` and the reporting code can just call the same functions. 

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


More information about the cfe-commits mailing list