[PATCH] D44934: [analyzer] Improve the modeling of `memset()`.

Artem Dergachev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 28 16:00:52 PDT 2018


NoQ added a comment.

Why do you need separate code for null and non-null character? The function's semantics doesn't seem to care.

I'd rather consider the case of non-concrete character separately. Because wiping a region with a symbol is not something we currently support; a symbolic default binding over a region means a different thing and it'd be equivalent to invalidation, so for non-concrete character we don't have a better choice than to invalidate. For concrete non-zero character, on the contrary, a default binding would work just fine.

Could you explain why didn't a straightforward `bindLoc` over a base region wasn't doing the thing you wanted? I.e., why is new Store API function necessary?


Repository:
  rC Clang

https://reviews.llvm.org/D44934





More information about the cfe-commits mailing list