[PATCH] D38358: [analyzer] Fix autodetection of getSVal()'s type argument.

Devin Coughlin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 2 10:23:03 PDT 2017


dcoughlin accepted this revision.
dcoughlin added a comment.
This revision is now accepted and ready to land.

Looks great to me.

I do wonder if long-term we should consider removing the auto-deduction when loading from the store. On the one hand it is really nice to avoid having to specify that at the call to getSVal(). On the other hand, this can lead to some really pathological weirdness and a bunch of corner-case code. For loads that result from actual program semantics the type of the loaded-from storage (from the loader's perspective) should always be easily available at the load site. There would still be cases where a checker might want to inspect what the store thinks is in memory, but I think that is a different function and in my opinion deserves a separate API.


https://reviews.llvm.org/D38358





More information about the cfe-commits mailing list