[PATCH] D88477: [analyzer] Overwrite cast type in getBinding only if that was null originally
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 29 07:10:44 PDT 2020
martong added a comment.
> In this example, it cast to the `unsigned char` (which is the type of the stored value of `**b`, stored at `#1`) instead of the static type of the access (the type of `**b` is `char`at `#2`).
Possible typo in the summary. At `#2` the type should be `char *` shouldn't it?
================
Comment at: clang/lib/StaticAnalyzer/Core/RegionStore.cpp:1442
} else {
- T = cast<TypedValueRegion>(MR)->getValueType();
+ if (T.isNull())
+ T = cast<TypedValueRegion>(MR)->getValueType();
----------------
Nice catch!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88477/new/
https://reviews.llvm.org/D88477
More information about the cfe-commits
mailing list