[PATCH] D57230: [analyzer] Toning down invalidation a bit
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 7 15:11:05 PST 2019
NoQ added a comment.
That's the one:
typedef __typeof(sizeof(int)) size_t;
void *malloc(size_t);
void escape(int **);
struct S {
int *ptr;
};
void foo() {
struct S s1;
s1.ptr = malloc(sizeof(int));
escape(&s1.ptr);
}
After the patch the allocated symbol no longer escapes. It didn't end up having much to do with destructors. I'll also think about it a bit more.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57230/new/
https://reviews.llvm.org/D57230
More information about the cfe-commits
mailing list