benedekaibas wrote:

> I think we might want to take a step back and discuss at a higher level what 
> we want to do here. It is possible that I am misunderstanding what this PR is 
> trying to achieve.
> 
> Consider the following example:
> 
> ```
> struct S {
>   int *owned;
>   int *view;
>   S();
>   S(const S&);
>   ~S();
> };
> 
> S getS(S input [[clang::lifetimebound]]);
> ```
> 
> Here, imagine `S` has both owned data, and data that refers to some other 
> unowned storage. The `lifetimebound` here expressed that the output `S` 
> depends on whatever the input `S` depended on. If we recursively do the 
> binding for all fields, we might end up introducing a false dependency on 
> `owned`. So I think the right thing to do in this case is to consult what the 
> input was depending on and propagate the same dependence.

I see your point and I agree that this can introduce many FPs. The prupose of 
this PR was just to introduce aggregate value tracking and then incrementally 
improve it in further PRs.

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

Reply via email to