[PATCH] D136603: [analyzer] Model cast after LValueToRValueBitCasts

2022-11-09 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. This 'new' approach with the type auto-detection behaves the same way as the originally proposed patch. Same results, still no crashes :) I'll update the summary and the title according to the new approach. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D136603: [analyzer] Model cast after LValueToRValueBitCasts

2022-11-07 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136603/new/ https://reviews.llvm.org/D136603 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[PATCH] D136603: [analyzer] Model cast after LValueToRValueBitCasts

2022-10-28 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/test/Analysis/svalbuilder-float-cast.c:18-19 *p += 1; // This should NOT be (float)$x + 1. Symbol $x was never casted to float. - // FIXME: Ideally, this should be $x + 1. - clang_analyzer_express(*p); // expected-warning{

[PATCH] D136603: [analyzer] Model cast after LValueToRValueBitCasts

2022-10-28 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D136603#3888065 , @steakhal wrote: > Previously, even in the `RegionStoreManager::getBinding()` even if `T` was > non-null, we replaced it with `TVR->getValueType()` in case the `MR` was > `TypedValueRegion`. Yeah, that mean

[PATCH] D136603: [analyzer] Model cast after LValueToRValueBitCasts

2022-10-27 Thread Balázs Benics via Phabricator via cfe-commits
steakhal updated this revision to Diff 471112. steakhal added a comment. Previously, even in the `RegionStoreManager::getBinding()` even if `T` was non-null, we replaced it with `TVR->getValueType()` in case the `MR` was `TypedValueRegion`. IMO we shouldn't overwrite the type unless we actually

[PATCH] D136603: [analyzer] Model cast after LValueToRValueBitCasts

2022-10-25 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > PS: I'm not sure how/when we should get rid of the LocAsInteger and > represent this by a SymbolCast. > Maybe @ASDenysPetrov or @martong could help me review this. Whenever this https://reviews.llvm.org/D117229 gets accepted and when we emit all symbolCasts for all int

[PATCH] D136603: [analyzer] Model cast after LValueToRValueBitCasts

2022-10-25 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. I am not sure, if the `ExprEngine::VisitCast` is the proper place to add these new modifications and call SValBuilder's evalCast. I think it might be better positioned in `RegionStoreManager::getBinding`. Considering, we already do a cast evaluation for certain kind of

[PATCH] D136603: [analyzer] Model cast after LValueToRValueBitCasts

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