[PATCH] D125709: [analyzer][Casting] Support isa, cast, dyn_cast of SVals
Aman LaChapelle via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 17 07:26:57 PDT 2022
bzcheeseman accepted this revision.
bzcheeseman added a comment.
This revision is now accepted and ready to land.
> In D125709#3519033 <https://reviews.llvm.org/D125709#3519033>, @bzcheeseman wrote:
>
>> In D125709#3518096 <https://reviews.llvm.org/D125709#3518096>, @steakhal wrote:
>>
>>> I had to fix the `doCast` to return `To` instead of `Optional<To>` to make it work.
>>
>> That's fine (or it should be!), you could dereference the optional if you wanted to
>
> Currently, we expect that casts result in regular SVal objects, instead of pointer-like objects , thus this code to compile:
> `NonLoc N = llvm::cast<NonLoc>(V)`, where `V` is of type `SVal`. I believe that is why I decided to make that change.
Makes sense, LGTM
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125709/new/
https://reviews.llvm.org/D125709
More information about the cfe-commits
mailing list