[PATCH] D99260: [analyzer] Fix false positives in inner pointer checker (PR49628)

2021-08-04 Thread Ali Shuja Siddiqui via Phabricator via cfe-commits
alishuja added a comment. Herald added a subscriber: manas. Based on the comment from @vsavchenko , I had made an addition for a check for `__addressof` alongside `addressof` in the checker. What would be the correct way of pushing the diff here? Should I reopen this revision or use the update

[PATCH] D99260: [analyzer] Fix false positives in inner pointer checker (PR49628)

2021-05-12 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. In D99260#2751967 , @steakhal wrote: > In D99260#2704102 , @NoQ wrote: > >> In https://bugs.llvm.org/show_bug.cgi?id=45786 the godbolt link shows that >> there are still problems with `a

[PATCH] D99260: [analyzer] Fix false positives in inner pointer checker (PR49628)

2021-05-11 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D99260#2704102 , @NoQ wrote: > In https://bugs.llvm.org/show_bug.cgi?id=45786 the godbolt link shows that > there are still problems with `addressof` (yes, their "trunk" clang is fresh > enough). They seem to have `__addresso

[PATCH] D99260: [analyzer] Fix false positives in inner pointer checker (PR49628)

2021-04-20 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. In https://bugs.llvm.org/show_bug.cgi?id=45786 the godbolt link shows that there are still problems with `addressof` (yes, their "trunk" clang is fresh enough). They seem to have `__addressof` instead of `addressof` so maybe we should cover that case real quick. Or maybe ou

[PATCH] D99260: [analyzer] Fix false positives in inner pointer checker (PR49628)

2021-04-08 Thread Valeriy Savchenko via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG663ac91ed1d6: [analyzer] Fix false positives in inner pointer checker (PR49628) (authored by vsavchenko). Repository: rG LLVM Github Monorepo CHA

[PATCH] D99260: [analyzer] Fix false positives in inner pointer checker (PR49628)

2021-04-08 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. I'm still not satisfied with the `addressof`, but I won't block this either. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99260/new/ https://reviews.llvm.org/D99260 ___ cfe-com

[PATCH] D99260: [analyzer] Fix false positives in inner pointer checker (PR49628)

2021-04-08 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land. Looks great now, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99260/new/ https://reviews.llvm.org/D99260 ___

[PATCH] D99260: [analyzer] Fix false positives in inner pointer checker (PR49628)

2021-04-08 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko updated this revision to Diff 336077. vsavchenko added a comment. Require std::data to accept exactly 1 argument Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99260/new/ https://reviews.llvm.org/D99260 Files: clang/lib/StaticAnalyzer/

[PATCH] D99260: [analyzer] Fix false positives in inner pointer checker (PR49628)

2021-04-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a comment. > It does make sense to split these in two, but I'm not so sure about > `evalCall`. `evalCall` should work great for this purpose but definitely not in this checker. Also this checker would still exercise its `checkPostCall` so it would still need to be silenced even if `e

[PATCH] D99260: [analyzer] Fix false positives in inner pointer checker (PR49628)

2021-03-31 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/test/Analysis/inner-pointer.cpp:23 + +char *data(std::string &c); + vsavchenko wrote: > martong wrote: > > Seems like all test are exercising with std::string, this looks like a > > legacy in this Checker. > > Sti

[PATCH] D99260: [analyzer] Fix false positives in inner pointer checker (PR49628)

2021-03-31 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added inline comments. Comment at: clang/test/Analysis/inner-pointer.cpp:23 + +char *data(std::string &c); + martong wrote: > Seems like all test are exercising with std::string, this looks like a legacy > in this Checker. > Still, I miss a bit at lea

[PATCH] D99260: [analyzer] Fix false positives in inner pointer checker (PR49628)

2021-03-30 Thread Gabor Marton via Phabricator via cfe-commits
martong added inline comments. Comment at: clang/test/Analysis/inner-pointer.cpp:23 + +char *data(std::string &c); + Seems like all test are exercising with std::string, this looks like a legacy in this Checker. Still, I miss a bit at least one test for the othe

[PATCH] D99260: [analyzer] Fix false positives in inner pointer checker (PR49628)

2021-03-29 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko added a comment. In D99260#2650201 , @steakhal wrote: > I recommend splitting this into two. I would happily accept the part about > `std::data()`. > > IMO `std::addressof()` should be modelled via `evalCall` as a pure function, > instead of h

[PATCH] D99260: [analyzer] Fix false positives in inner pointer checker (PR49628)

2021-03-25 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. I recommend splitting this into two. I would happily accept the part about `std::data()`. IMO `std::addressof()` should be modelled via `evalCall` as a pure function, instead of hacking it into the `InnerPtrChecker`. It is overloaded to accept `const T&` as well, so th

[PATCH] D99260: [analyzer] Fix false positives in inner pointer checker (PR49628)

2021-03-24 Thread Valeriy Savchenko via Phabricator via cfe-commits
vsavchenko created this revision. vsavchenko added reviewers: NoQ, steakhal, xazax.hun, ASDenysPetrov. Herald added subscribers: martong, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware. vsavchenko requested review of this revision. Herald