<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Feb 3, 2014 at 9:45 AM, Jordan Rose <span dir="ltr"><<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

  This is fine but it doesn't turn it on for anybody. Unless Richard has any objections, I think it's fine to turn this on for -Wuninitialized, just not for the analyzer. It looks like one good place to do this is in AnalysisManager, which is only used by the analyzer.</blockquote>
<div><br></div><div>In principle I'm strongly in favour of enabling this for -Wuninitialized. I think we want this for -Wthread-safety, -Wconsumed, and -Winfinite-recursion too. But I think it'll do the wrong thing for -Wunreachable-code right now:</div>
<div><br></div><div>  struct S {</div><div>    bool b;</div><div>    int n = b ? 1 : 2;</div><div>    S() : b(true) {} // warning, '2' above is unreachable</div><div>  };</div><div><br></div><div>Sema's analysis-based warnings only builds one CFG for all its analyses, so I think we'll need to teach -Wunreachable-code to do the right thing here before we can enable this in AnalysisBasedWarnings. Hopefully we can suppress 'unreachable' diagnostics inside CXXDefaultInitExprs easily enough?</div>
</div></div></div>