[PATCH] D124621: [Analyzer] Fix assumptions about const field with member-initializer

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 29 09:25:43 PDT 2022


steakhal accepted this revision.
steakhal added a comment.

In D124621#3482782 <https://reviews.llvm.org/D124621#3482782>, @mantognini wrote:

> In D124621#3481973 <https://reviews.llvm.org/D124621#3481973>, @steakhal wrote:
>
>> BTW have you measured the observable impact of this patch on large codebases? Do you have any stats?
>
> I can't share the data but I can say it fixes some user reports. :-)

For the upcoming patches, it would be nice to test the patches on a small set of open-source projects for exactly this reason.
I think there is a `clang/utils/analyzer/SATest.py` script helping you on this part.
It seems we have quite a few projects on the testset `clang/utils/analyzer/projects/projects.json`.
We are not using it, because we have a different internal testing infrastructure, but it's definitely better than nothing.

> I think @NoQ refers to https://reviews.llvm.org/D45774 but I'll wait for a week or so for confirmation in case there's more to it.

Cool!



================
Comment at: clang/lib/StaticAnalyzer/Core/RegionStore.cpp:1982-1984
   // Check if the region has a binding.
   if (const Optional<SVal> &V = B.getDirectBinding(R))
     return *V;
----------------
@NoQ I was always puzzled why don't we check if we have default bindings after checking direct bindings.
Do you have anything about that?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124621/new/

https://reviews.llvm.org/D124621



More information about the cfe-commits mailing list