Xazax-hun wrote:

> That is why I have decided to create a set for the dead sources and record 
> the died variables from checkLifetimeEnd in that set. Then in the 
> checkLocation I can emit the warning if the bound source is in the dead 
> source set.

This sounds good to me! 

> I think if we would make the change in the CFG::LifetimeEnds to differentiate 
> between inner and outer scope that would lead to easier detection in the 
> checker. 

I am not 100% sure yet if this is a tradeoff that we want to make. I am happy 
with the approach you took but we can always come back later to revisit this 
decision. 

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

Reply via email to