[PATCH] D132142: [analyzer] Prefer wrapping SymbolicRegions by ElementRegions

2022-09-12 Thread Balázs Benics via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. steakhal marked 3 inline comments as done. Closed by commit rGf8643a9b31c4: [analyzer] Prefer wrapping SymbolicRegions by ElementRegions (authored by steakhal). Changed prior to commit: https://reviews.llvm.org/D132142?vs

[PATCH] D132142: [analyzer] Prefer wrapping SymbolicRegions by ElementRegions

2022-09-01 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:799 + /// we actually know their types. + QualType getApproximatedType() const { +return sym->getType()->getPointeeType(); steakhal wrote: > marton

[PATCH] D132142: [analyzer] Prefer wrapping SymbolicRegions by ElementRegions

2022-09-01 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:799 + /// we actually know their types. + QualType getApproximatedType() const { +return sym->getType()->getPointeeType(); martong wrote: > I thin

[PATCH] D132142: [analyzer] Prefer wrapping SymbolicRegions by ElementRegions

2022-08-31 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. I am okay with this change, it does give a proper canonical form, which is good. On the other hand, I agree that (on the long term) base regions and offsets would be a better memory model th

[PATCH] D132142: [analyzer] Prefer wrapping SymbolicRegions by ElementRegions

2022-08-23 Thread Balázs Benics via Phabricator via cfe-commits
steakhal updated this revision to Diff 454859. steakhal added a comment. upload the same with context Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132142/new/ https://reviews.llvm.org/D132142 Files: clang/include/clang/StaticAnalyzer/Checkers/S

[PATCH] D132142: [analyzer] Prefer wrapping SymbolicRegions by ElementRegions

2022-08-23 Thread Balázs Benics via Phabricator via cfe-commits
steakhal updated this revision to Diff 454857. steakhal added a comment. - Simplify `getApproximatedType()` to `return sym->getType()->getPointeeType();` - Add doc comments to `getApproximatedType()` - Removed the "Copied from RegionStoreManager::bind()" FIXME from the `ExprEngine::VisitMemberExp

[PATCH] D132142: [analyzer] Prefer wrapping SymbolicRegions by ElementRegions

2022-08-19 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h:791-793 + /// TODO: Ellaborate why this is not a typed region, and why this is just an + /// 'approximation'. + QualType getApproximatedType() const { ---

[PATCH] D132142: [analyzer] Prefer wrapping SymbolicRegions by ElementRegions

2022-08-19 Thread Balázs Benics via Phabricator via cfe-commits
steakhal updated this revision to Diff 454009. steakhal added a comment. - Use `:digit:` regex matching in the tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132142/new/ https://reviews.llvm.org/D132142 Files: clang/include/clang/StaticAna

[PATCH] D132142: [analyzer] Prefer wrapping SymbolicRegions by ElementRegions

2022-08-19 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. I agree with @steakhal. Getting rid of element regions might be a lot of work and might have a lot of fallout that we need to deal with. I think we should not block a fix for something that we might not be able to land for a long time. Fixing this here, and independe

[PATCH] D132142: [analyzer] Prefer wrapping SymbolicRegions by ElementRegions

2022-08-19 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/test/Analysis/trivial-copy-struct.cpp:26 + + clang_analyzer_dump(n1); // expected-warning {{&SymRegion{reg_$2}}} + clang_analyzer_dump(n2); // expected-warning {{&HeapSymRegion{conj_$1{Node *, LC1, S1855, #1 ---

[PATCH] D132142: [analyzer] Prefer wrapping SymbolicRegions by ElementRegions

2022-08-18 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D132142#3733629 , @NoQ wrote: > Like I vaguely mentioned in the thread, I'm really curious whether it's > possible to canonicalize the *absence* of element regions instead, as it > allows modeling pointer casts as no-op and

[PATCH] D132142: [analyzer] Prefer wrapping SymbolicRegions by ElementRegions

2022-08-18 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. Like I vaguely mentioned in the thread, I'm really curious whether it's possible to canonicalize the *absence* of element regions instead, as it allows modeling pointer casts as no-op and avoids problems like D38797 where results of even ve

[PATCH] D132142: [analyzer] Prefer wrapping SymbolicRegions by ElementRegions

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