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

2020-04-27 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. In D78853#2003866 , @efriedma wrote: > Please don't add null checks for pointers that can't be null. It makes the > code slower and harder to understand. And least one of the checks you added > is actively breaking the code. >

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

2020-04-25 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Please don't add null checks for pointers that can't be null. It makes the code slower and harder to understand. And least one of the checks you added is actively breaking the code. In some cases, the analysis is pointing to cases where the code could be made more

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

2020-04-24 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added reviewers: rsmith, efriedma, rnk, dblaikie. Running the PREfast static analysis tool on clang resulted in several null pointer dereference warnings. This is the first of several patches to fix these. The full list of warnings reported is here: