[PATCH] D128535: [analyzer] Improve loads from reinterpret-cast fields

2022-07-26 Thread Balázs Benics via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. steakhal marked 2 inline comments as done. Closed by commit rGa80418eec001: [analyzer] Improve loads from reinterpret-cast fields (authored by steakhal). Changed prior

[PATCH] D128535: [analyzer] Improve loads from reinterpret-cast fields

2022-07-11 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision. martong added a comment. This revision is now accepted and ready to land. LGTM (given that you remove the vague and disturbing FIXME comments). Comment at: clang/lib/StaticAnalyzer/Core/RegionStore.cpp:2014-2017 + // FIXME: This is a hack, and d

[PATCH] D128535: [analyzer] Improve loads from reinterpret-cast fields

2022-07-07 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/lib/StaticAnalyzer/Core/RegionStore.cpp:1897 + QualType Ty = SubReg->getValueType(); + if (BaseTy->isScalarType() && Ty->isScalarType()) { +if (Ctx.getTypeSizeInChars(BaseTy) >= Ctx.getTypeSizeInChars(Ty)) {

[PATCH] D128535: [analyzer] Improve loads from reinterpret-cast fields

2022-07-04 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. I like it, but I'd like to know more about the nature of the applied "hack" and if there is a way to solve it properly in the longer term. Comment at: clang/lib/StaticAnalyzer/Core/RegionStore.cpp:2014-2017 + // FIXME: This is a hack, and doesn't do a

[PATCH] D128535: [analyzer] Improve loads from reinterpret-cast fields

2022-06-24 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. No runtime diff. No crashes. 8 disappeared: - 4 core.CallAndMessage (1st arg is uninitialized) - 2 alpha.deadcode.UnreachableCode (sinked before reaching it) - 2 core.UndefinedBinaryOperatorResult 2 new reports: - 1 core.UndefinedBinaryOperatorResult - 1 alpha.security

[PATCH] D128535: [analyzer] Improve loads from reinterpret-cast fields

2022-06-24 Thread Balázs Benics via Phabricator via cfe-commits
steakhal created this revision. steakhal added reviewers: NoQ, martong, ASDenysPetrov. Herald added subscribers: manas, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun. Herald added a reviewer: Szelethus. Herald added a project: All. steak