[PATCH] D46368: [analyzer] pr18953: Zeroing constructors, store binding extents, ASTRecordLayouts.
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 4 15:02:41 PDT 2018
NoQ added a comment.
> We could work around that by invalidating object contents every time we detect something fishy. The only reasonable detection i can come up with would be to detect if we have a coinciding binding (i.e. what the assertion was previously protecting us from), eg.:
>
> if (B.getDefaultBinding(R) || B.getDirectBinding(R))
> V = UnknownVal();
>
>
> This detection is imperfect - there are tests that would still fail. In particular it won't fix the `ASTRecordLayout` problem. And i also suspect that it really destroys a lot more good data than bad data. So i'll be experimenting with that now. In the current version of the patch i remove the special case handling and simply bind the default value blindly even if i know that `RegionStore` can't handle it precisely.
Committed as is for now. Didn't notice any difference between the three approaches on my C++ testing grounds.
Repository:
rL LLVM
https://reviews.llvm.org/D46368
More information about the cfe-commits
mailing list