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

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 9 07:49:46 PST 2016


dblaikie added a subscriber: dblaikie.
dblaikie added a comment.

I think we had a discussion about this before.

Clang has a few versions of this warning. One version is probably as
aggressive as the warning you are trying to quiet (-Wmaybe-uninitialized)
and we made a deliberate choice not to enable it for the project. I think
we should probably make the same choice here and not enable it.

Initializations we never expect to use (eg because we have a covered switch
that initializes in all cases, or some slightly complex control flow the
compiler can't see through) hinder our ability to find uses of those with
tools like msan.

We do enable clangs -Wsometimes-uninitialized which is more restrictive
(fewer false positives. At the cost of more false negatives).


http://reviews.llvm.org/D17983





More information about the cfe-commits mailing list