<div style="font-family: arial, helvetica, sans-serif; font-size: 10pt"><div dir="ltr"><div class="gmail_default" style>On Wed, Dec 19, 2012 at 1:04 PM, Dmitri Gribenko <span dir="ltr"><<a href="mailto:gribozavr@gmail.com" target="_blank" class="cremed">gribozavr@gmail.com</a>></span> wrote:<br>
</div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Wed, Dec 19, 2012 at 11:02 PM, Jakob Stoklund Olesen <<a href="mailto:stoklund@2pi.dk" class="cremed">stoklund@2pi.dk</a>> wrote:<br>

><br>
> On Dec 19, 2012, at 11:01 AM, Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com" class="cremed">gribozavr@gmail.com</a>> wrote:<br>
><br>
>> On Tue, Aug 21, 2012 at 12:39 AM, Jakob Stoklund Olesen <<a href="mailto:stoklund@2pi.dk" class="cremed">stoklund@2pi.dk</a>> wrote:<br>
>>>       ++MBBI;<br>
>>>       if (MBBI == MF->end()) {<br>
>>>         report("MBB conditionally falls through out of function!", MBB);<br>
>>> -      } if (MBB->succ_size() != 2) {<br>
>>> +      } if (MBB->succ_size() == 1) {<br>
>><br>
>> Hello Jakob,<br>
>><br>
>> Sorry to comment on an old commit, but '} if (...' looks suspicious --<br>
>> 'else' is probably missing.  I have just fixed two bugs of this kind<br>
>> in Clang, found by grep '} if'.<br>
><br>
> Yikes, that does indeed look like a missing else.<br>
><br>
> Please go ahead and fix it.<br>
<br>
</div>OK to commit without a testcase?</blockquote><div><br></div><div style>I'd like a testcase. =]</div><div style><br></div><div style>Dmitri, want to try your hand at building a Clang warning for this? I just chatted with Richard and he seemed to think it could work by warning in the Parser when looking for an 'else' token, finding an 'if' token, and the '}' and 'if' tokens' spelling locations are on the same line. (or checking the start-of-line flag on the 'if' token, but Richard thought there might be problems there).</div>
</div></div></div></div>