================
@@ -105,6 +107,92 @@ bool implicitObjectParamIsLifetimeBound(const FunctionDecl
*FD) {
return isNormalAssignmentOperator(FD);
}
+std::optional<LifetimeBoundParamInfo>
+getLifetimeBoundParamInfo(const FunctionDecl *FD, unsigned I) {
----------------
Xazax-hun wrote:
Apologise, indeed I was a bit confused and not specific enough. While indeed
the lifetime bound annotation processing is factored out, I think the logic in
`ShouldTrackArg` overlaps very heavily with this function and it is unfortunate
significant portion of this loop is implemented twice.
I wonder if we should just do all the work once, basically factoring out
`ShouldTrackArg` fully, and change the diagnostic to either say something was
marked lifetimebound or something was inferred as lifetimebound if we had some
other heuristics in place. I want there to be a single source or truth, a
single function that calculates whether we consider something lifetimebound or
not, and use it everywhere.
https://github.com/llvm/llvm-project/pull/206337
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits