<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Good point. Now that I think about it, checking if the flags are invalid shouldn't be much more code. I'll look at the spec and commit a fix.<div><br></div><div>Thanks,</div><div><br></div><div>Tom</div><div><br></div><div><div>On 08/06/2010, at 9:37 PM, Ted Kremenek wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jun 8, 2010, at 9:11 PM, Tom Care wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">Author: tcare<br>Date: Tue Jun  8 23:11:11 2010<br>New Revision: 105680<br><br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=105680&view=rev">http://llvm.org/viewvc/llvm-project?rev=105680&view=rev</a><br>Log:<br>Added FixIt support to printf format string checking.<br>- Refactored LengthModifier to be a class.<br>- Added toString methods in all member classes of FormatSpecifier.<br>- FixIt suggestions keep user specified flags unless incorrect.<br><br>Limitations:<br>- The suggestions are not conversion specifier sensitive. For example, if we have a 'pad with zeroes' flag, and the correction is a string conversion specifier, we do not remove the flag. Clang will warn us on the next compilation.</span></blockquote></div><br><div>Hi Tom,</div><div><br></div><div>Wouldn't it be better just not to do a fixit in such cases (under "Limitations")?  I'd rather we leave the code "broken" in the original form then have it "broken" in a form the programmer didn't write.  We should only change the code if it will actually make it correct.</div><div><br></div><div>Ted</div></div></blockquote></div><br></body></html>