[PATCH] D17983: Eliminate many benign instances of "potentially uninitialized local variable" warnings

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 28 22:55:59 PDT 2016


mehdi_amini added a comment.

@dblaikie mentioned before that it is not clear that this is something we want to do at all (initialize all local variables).
Would it be something we should have policy on in the first place before integrating such a patch? (Reminds me of constructor that don't initializes all members "on purpose").
Maybe send an RFC to LLVM-dev and codify this in the coding guidelines?

In https://reviews.llvm.org/D17983#371040, @ariccio wrote:

> ... I'd rather crash on a nullptr deref than some undefined behavior.


Wait... Isn't nullptr deref UB?


https://reviews.llvm.org/D17983





More information about the llvm-commits mailing list