[clang] [analyzer] Avoid creating LazyCompoundVal when possible (PR #116840)

Balazs Benics via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 20 05:44:40 PST 2024


steakhal wrote:

> The change LGTM and I'm happy to hear that you're improving the handling of compound values. I hope that these foundational improvements will help further development of checkers that deal with structured data. (Perhaps even the iterator checkers could be stabilized eventually...)

Yes, this would be awesome. Unfortunately, I fix one thing and that uncovers something else, and continues.
That said there is a chance that I can't post them because with the areas where we would regress we would be worse off in the end in terms of FPs TPs. So, I might not fit in the sprint to stabilize these improvements and I'd need to switch tasks and pause these patches. Debugging LCVs and copy modeling is a time consuming work.
I can't promise anything :s

> On our downstream branch this commit breaks a few tests, but I think that this just exposes faults of our internal-use checkers (which we'll update eventually).

Thanks for checking! Sorry for putting burden on you, and this is why I tried to motivate the change with a lengthy description. Hopefully they are also good source of learning.

> By the way I think there is a typo in the PR description: the word "not" is missing from the location where I marked it in brackets:
> 
> > I should [not] have just blindly create an LCV by calling createLazyBinding(), but rather check if I can apply the shortcut
> 
> (Also, "create" should be "created".)

Thanks for spotting!

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


More information about the cfe-commits mailing list