[PATCH] D125709: [analyzer][Casting] Support isa, cast, dyn_cast of SVals

2022-06-14 Thread Balázs Benics via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGde6ba9704d0b: [analyzer][Casting] Support isa, cast, dyn_cast of SVals (authored by steakhal). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125709/new/

[PATCH] D125709: [analyzer][Casting] Support isa, cast, dyn_cast of SVals

2022-05-18 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D125709#3519850 , @xazax.hun wrote: > While not having tests might be OK, but I'd prefer to introduce at least a > couple uses of the new facilities so existing tests cover them. I've added a use of the new `dyn_cast` and

[PATCH] D125709: [analyzer][Casting] Support isa, cast, dyn_cast of SVals

2022-05-18 Thread Balázs Benics via Phabricator via cfe-commits
steakhal updated this revision to Diff 430327. steakhal added a comment. - Added uses for `dyn_cast` and `cast` of the new specialization. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125709/new/ https://reviews.llvm.org/D125709 Files:

[PATCH] D125709: [analyzer][Casting] Support isa, cast, dyn_cast of SVals

2022-05-17 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. While not having tests might be OK, but I'd prefer to introduce at least a couple uses of the new facilities so existing tests cover them. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125709/new/

[PATCH] D125709: [analyzer][Casting] Support isa, cast, dyn_cast of SVals

2022-05-17 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Thanks for your help @bzcheeseman! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125709/new/ https://reviews.llvm.org/D125709 ___ cfe-commits mailing list

[PATCH] D125709: [analyzer][Casting] Support isa, cast, dyn_cast of SVals

2022-05-17 Thread Aman LaChapelle via Phabricator via cfe-commits
bzcheeseman accepted this revision. bzcheeseman added a comment. This revision is now accepted and ready to land. > In D125709#3519033 , @bzcheeseman > wrote: > >> In D125709#3518096 , @steakhal >> wrote: >> >>>

[PATCH] D125709: [analyzer][Casting] Support isa, cast, dyn_cast of SVals

2022-05-17 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. In D125709#3518242 , @martong wrote: >> I'm not sure, shall I add tests? > > Yes, please. Unit tests for `dyn_cast` and `isa` should be easy. However, I > am not sure how to test `cast` for the failure cases. What if we were

[PATCH] D125709: [analyzer][Casting] Support isa, cast, dyn_cast of SVals

2022-05-17 Thread Aman LaChapelle via Phabricator via cfe-commits
bzcheeseman added a comment. In D125709#3518096 , @steakhal wrote: > I had to fix the `doCast` to return `To` instead of `Optional` to make it > work. That's fine (or it should be!) but you can also just dereference the optional, right? Repository:

[PATCH] D125709: [analyzer][Casting] Support isa, cast, dyn_cast of SVals

2022-05-17 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. > I'm not sure, shall I add tests? Yes, please. Unit tests for `dyn_cast` and `isa` should be easy. However, I am not sure how to test `cast` for the failure cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D125709: [analyzer][Casting] Support isa, cast, dyn_cast of SVals

2022-05-17 Thread Balázs Benics via Phabricator via cfe-commits
steakhal marked an inline comment as done. steakhal added a comment. I had to fix the `doIt` to return `To` instead of `Optional` to make it work. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125709/new/ https://reviews.llvm.org/D125709

[PATCH] D125709: [analyzer][Casting] Support isa, cast, dyn_cast of SVals

2022-05-17 Thread Balázs Benics via Phabricator via cfe-commits
steakhal updated this revision to Diff 429947. steakhal added a comment. Use `cast` and `dyn_cast` in `castAs` and `getAs` respecitvely. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125709/new/ https://reviews.llvm.org/D125709 Files:

[PATCH] D125709: [analyzer][Casting] Support isa, cast, dyn_cast of SVals

2022-05-16 Thread Aman LaChapelle via Phabricator via cfe-commits
bzcheeseman added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h:102 template T castAs() const { assert(T::classof(*this)); Is it worth refactoring this and getAs to use `cast` and `dyn_cast` as

[PATCH] D125709: [analyzer][Casting] Support isa, cast, dyn_cast of SVals

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