Re: [PATCH] D78853: [Analysis] Fix null pointer dereference warnings [1/n]

2020-04-29 Thread Aaron Puchert via cfe-commits
Am 29.04.20 um 23:11 schrieb Mandeep Singh Grang: > My previous email details why we are doing > this: http://lists.llvm.org/pipermail/llvm-dev/2020-April/141167.html > Basically, we ran the PREfast static analysis tool on LLVM/Clang and > it reported a lot of warnings. I guess some of them are

Re: [PATCH] D78853: [Analysis] Fix null pointer dereference warnings [1/n]

2020-04-29 Thread Mandeep Singh Grang via cfe-commits
My previous email details why we are doing this: http://lists.llvm.org/pipermail/llvm-dev/2020-April/141167.html Basically, we ran the PREfast static analysis tool on LLVM/Clang and it reported a lot of warnings. I guess some of them are false positives after all. As David suggests that maybe I

[PATCH] D78853: [Analysis] Fix null pointer dereference warnings [1/n]

2020-04-28 Thread Aaron Puchert via Phabricator via cfe-commits
aaronpuchert added a comment. Could you explain why we are doing this? Clang has its own static analyzer , which can find null dereferences as well but also tracks constraints

[PATCH] D78853: [Analysis] Fix null pointer dereference warnings [1/n]

2020-04-27 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/lib/Analysis/ThreadSafety.cpp:1938-1940 +// The default value for the argument VD to the current function is +// nullptr. So we assert that VD is non null because we deref VD here. +assert(VD && "!VD");

[PATCH] D78853: [Analysis] Fix null pointer dereference warnings [1/n]

2020-04-27 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang updated this revision to Diff 260517. mgrang retitled this revision from "[Sema] Fix null pointer dereference warnings [1/n]" to "[Analysis] Fix null pointer dereference warnings [1/n]". CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78853/new/ https://reviews.llvm.org/D78853