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

Eli Friedman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Apr 25 16:28:27 PDT 2020


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 clear for both humans and machines with some refactoring or assertions.  Patches welcome, but please make sure any assertions properly explain the invariant. And please split the patches up a bit more; adding assertions for complex invariants in ten different unrelated places is more than I really want to review at once.

(Also, a reminder, please post patches with full context.)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78853/new/

https://reviews.llvm.org/D78853





More information about the cfe-commits mailing list