<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Aug 7, 2014, at 12:42 PM, Manuel Klimek <<a href="mailto:klimek@google.com" class="">klimek@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><blockquote class="gmail_quote" style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;" class=""><div class=""><div class="">Specifically for -Wreturn-type, the change I proposed should not impact that warning at all.</div></div></div></blockquote><div style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">If the change didn't affect this at all, we'd have loads of false positives for Wreturn-type, because it uses the reachability analysis to figure out whether anything falls out at the end of the function... </div><br class="Apple-interchange-newline"></div></blockquote></div><br class=""><div class="">Sorry, what I meant to say is that using addSuccessor() in the way I suggested should not have caused a functionality regression in -Wreturn-type. For that analysis the blocks still appear unreachable. We're probably saying the same thing.</div><div class=""><br class=""></div><div class="">Looking at this case again:</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class="">int testConditionallyExecutedComplexTernaryTrueBranch(bool value) {<br class=""> value || (true ? NoReturn() : true);<br class="">-} // expected-warning {{control may reach end of non-void function}}<br class="">+}<br class=""></blockquote></div><div class=""><br class=""></div><div class="">It seems like we should still be emitting a warning here. The variable 'value' is not known to true or false; this means that we can reach the end of the function without hitting return if 'value' was 'true'. In other words, NoReturn() does not dominate all exits from the function, and thus we should warn here.</div></body></html>